Skip to content

Failure to locate resources when the application plugin is in use #26

@aalmiray

Description

@aalmiray

Using the application plugin in conjunction with the modularity plugin results in error when attempting to load resources found in the same package. Take the following project structure

.
├── build.gradle
├── gradle
│   └── wrapper
│       ├── gradle-wrapper.jar
│       └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── src
    └── main
        ├── java
        │   ├── com
        │   │   └── acme
        │   │       └── sample
        │   │           └── Launcher.java
        │   └── module-info.java
        └── resources
            └── com
                └── acme
                    └── sample
                        └── text.txt

Code to reproduce the problem can be found at https://github.com/aalmiray/sample-modularity

------------------------------------------------------------
Gradle 4.10.2
------------------------------------------------------------

Build time:   2018-09-19 18:10:15 UTC
Revision:     b4d8d5d170bb4ba516e88d7fe5647e2323d791dd

Kotlin DSL:   1.0-rc-6
Kotlin:       1.2.61
Groovy:       2.4.15
Ant:          Apache Ant(TM) version 1.9.11 compiled on March 23 2018
JVM:          11 (Oracle Corporation 11+28)
OS:           Mac OS X 10.13.6 x86_64

This problem was also reported at the Gradle forums: https://discuss.gradle.org/t/loading-resources-files-in-java-11/28704/11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions