gradle / gradle/playframework

Duplicated modules jar in stageMainDist

Open
#159 9 comments 0 reactions 0 assignees View on GitHub
bug question
Dominant language
Java
Stars
47
Forks
41
PR merge metrics
No merged PRs in 30d

Description

Not sure this is an issue with my project structure or how the plugin stages jars, but wanted to report it here in order to get a little more visibility.

I haven't been able yet to create a small project to reproduce this, and I'm not a gradle expert, but our I noticed how the jar created for our project has duplicated libraries for all the project's modules.

Our project has the following simplified structure:

```
\ root
|_ modules
|_ core
```

build.gradle
```
plugins {
id 'org.gradle.playframework' version '0.10'
}
...
dependencies {
implementation project(":core")
}
```

settings.gradle
```
include 'core'
project(':core').projectDir = new File(settingsDir, 'modules/core')
```

\modules\core\buld.gradle
```
plugins {
id 'org.gradle.playframework'
}
```

Now, when I run the `dist` task, defined [here][1], as a step to create our deployable RPM, that is creating a `/build/stage/main/lib` with the project library dependencies, and is copying twice the core's module jar and asset's jar, in a way that I have the following files:

1. core.jar
2. core-core.jar
3. core-assets.jar
4. core-core-assets.jar

where 1 and 2 contain the same exact files, same for 3 and 4.

I was able to pinpoint the task `:stageMainDist` as the task copying the dependencies there, but I'm not sure whether this behavior is an issue with the plugin or with our configuration.

Has anyone observed the same behavior?

Thanks!

[1]: https://gradle.github.io/playframework/

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.