gradle-modules-plugin | Gradle plugin helps working with the Java Platform Module | Plugin library

 by   java9-modularity Java Version: v1.8.12 License: MIT

kandi X-RAY | gradle-modules-plugin Summary

kandi X-RAY | gradle-modules-plugin Summary

gradle-modules-plugin is a Java library typically used in Plugin, Gradle applications. gradle-modules-plugin has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. However gradle-modules-plugin has 2 bugs. You can download it from GitHub.

This Gradle plugin helps working with the Java Platform Module System. The plugin is published in the [Gradle plugin repository] It makes building, testing and running modules seamless from the Gradle perspective. It sets up compiler and jvm settings with flags such as --module-path, so that you can build, test and run JPMS modules without manually setting up your build files. Also, you should disable the modularity.inferModulePath option introduced in Gradle 6.4: modularity.inferModulePath.set(false).
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              gradle-modules-plugin has a low active ecosystem.
              It has 208 star(s) with 31 fork(s). There are 21 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 32 open issues and 94 have been closed. On average issues are closed in 52 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of gradle-modules-plugin is v1.8.12

            kandi-Quality Quality

              OutlinedDot
              gradle-modules-plugin has 2 bugs (1 blocker, 0 critical, 1 major, 0 minor) and 110 code smells.

            kandi-Security Security

              gradle-modules-plugin has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              gradle-modules-plugin code analysis shows 0 unresolved vulnerabilities.
              There are 2 security hotspots that need review.

            kandi-License License

              gradle-modules-plugin is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              gradle-modules-plugin releases are available to install and integrate.
              Build file is available. You can build the component from source.
              Installation instructions are not available. Examples and code snippets are available.
              gradle-modules-plugin saves you 1577 person hours of effort in developing the same functionality from scratch.
              It has 3507 lines of code, 334 functions and 111 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed gradle-modules-plugin and discovered the below as its top functions. This is intended to give you an instant insight into gradle-modules-plugin implemented functionality, and help decide if they suit your requirements.
            • Configure module
            • Configure start scripts
            • Add javadoc options to module options
            • Configure the compiler
            • Configure the modules for compile
            • Creates a copy of a patch module container
            • Configure the given JavaCompile task
            • Creates the compiler arguments
            • Configure the compilation modules
            • Pre - configure the compilation
            • Configure the patch module
            • Adjust the main class of the module
            • Add a grand - child attribute
            • Configure the run
            • Sets the mixed Java release options
            • Configure the Java release to use
            • Adds the javadoc option to the options of the core
            • Resolve a path to a module name
            • Returns the gradle scope of an item
            • Configures the Eclipse
            • Configures merge classes after evaluator
            • Moves all patched libraries to the location
            Get all kandi verified functions for this library.

            gradle-modules-plugin Key Features

            No Key Features are available at this moment for gradle-modules-plugin.

            gradle-modules-plugin Examples and Code Snippets

            No Code Snippets are available at this moment for gradle-modules-plugin.

            Community Discussions

            QUESTION

            Java modularity, compilation problem in test classes using java9-modularity plugin for gradle
            Asked 2020-Apr-28 at 15:36

            I'm trying to create Java application using Java module system with gradle. I use this plugin: https://github.com/java9-modularity/gradle-modules-plugin as recommended by gradle. Java sources compile properly and use module-info.java as expected. However, my unit test does not work anymore. I want to use assertJ which is causing problems now. When I try to compile test classes, I'm getting this error:

            error: package org.assertj.core.api is not visible import static org.assertj.core.api.Assertions.assertThat; ^ (package org.assertj.core.api is declared in module org.assertj.core, but module module.test.main does not read it)

            I tried to set

            ...

            ANSWER

            Answered 2020-Apr-28 at 15:36

            As documented in the plugin documentation, by default testing happens on the module path.

            What you changed is about running tests. However test compilation also happens on the module path, you thus need the test dependencies to be properly imported by your module. Which is what the error is telling you.

            As an alternative, you could try the native support in upcoming Gradle 6.4, a release candidate is available

            Source https://stackoverflow.com/questions/61424545

            QUESTION

            How can I set the ModuleMainClass attribute of a JPMS module using Gradle?
            Asked 2019-Dec-02 at 16:10

            I'm using Gradle (6.0.1) with the moduleplugin to build an application out of JPMS modules using JDK 13.

            However, even with the application plugin applied & its mainClassName set it does not set the ModuleMainClass attribute in module-info.class, so when I jlink it up into a standalone JVM and run java -m mymodule I get this message:

            module mymodule does not have a ModuleMainClass attribute, use -m /

            Digging under the hood it looks like the moduleplugin doesn't change the jar task at all, and the out of the box gradle jar task does not actually use the JDK's jar command, it just zips everything up itself.

            As far as I can tell the only way to set the ModuleMainClass attribute in module-info.class is to use the JDK's jar command as so: jar --main-class=CLASSNAME -C .

            Is there a way to do this, short of writing my own gradle task? And if not, has anyone got an example of replacing the gradle jar task with one that calls the JDK command?

            (Please note this question is not about setting the Main-Class in the jar's MANIFEST.MF - that's easy, but isn't respected when calling java -m .)

            ...

            ANSWER

            Answered 2019-Dec-02 at 16:10

            It looks like the jar task in gradle does not do a proper job of building the jar to also include the module-main-class in the module-info.class. In fact it doesn't look like it calls the jar command at all which is a bit misleading. So here is an updated version that does this:

            Source https://stackoverflow.com/questions/59117333

            QUESTION

            Compile a JDK 8 project + a JDK 9 "module-info.java" in Gradle
            Asked 2019-Apr-07 at 18:02

            I'm working on a Java library targeting JDK 8, and I'm building it in Gradle 5 using OpenJDK 11. In order to target JDK 8, I'm javac's --release option.

            However, I'd also like my library to be JPMS-compatible. In other words:

            • I'd like to provide a module-info.class compiled with --release 9 (option 3 in Stephen Colebourne's scale),
            • while all the rest is compiled with --release 8.
            MCVE

            build.gradle:

            ...

            ANSWER

            Answered 2019-Apr-07 at 18:02

            EDIT: This functionality is now supported by Gradle Modules Plugin since version 1.5.0.

            Here's a working build.gradle snippet:

            Source https://stackoverflow.com/questions/55100737

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install gradle-modules-plugin

            You can download it from GitHub.
            You can use gradle-modules-plugin like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the gradle-modules-plugin component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/java9-modularity/gradle-modules-plugin.git

          • CLI

            gh repo clone java9-modularity/gradle-modules-plugin

          • sshUrl

            git@github.com:java9-modularity/gradle-modules-plugin.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link