Skip to content

Commit

Permalink
feat: include
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasbjerre committed Sep 4, 2021
1 parent 285eb00 commit d550e6b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -173,7 +173,7 @@ It has `Spotbugs` configured in combination with [Violations Gradle Plugin](http
Tested with Gradle 7.0.2.

```sh
./gradlew wrapper --gradle-version=6.8.3 --distribution-type=bin
./gradlew wrapper --gradle-version=7.0.2 --distribution-type=bin
```

## Developer instructions
Expand Down
13 changes: 10 additions & 3 deletions src/main/resources/main.gradle
Expand Up @@ -231,7 +231,9 @@ def configureJava() {

test {
if (System.getProperty('DEBUG', 'false') == 'true') {
jvmArgs '-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9009'
jvmArgs '-Xdebug',
'-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9009',
'-parameters'
}
}

Expand Down Expand Up @@ -501,6 +503,11 @@ def configureRelease() {
from javadoc.destinationDir
}

task testJar(type: Jar, dependsOn: testClasses) {
classifier = 'test'
from sourceSets.test.allSource
}

def artifactsList = []
def useShadowJar = !effectiveConfig.publishing.relocate.isEmpty()
if (useShadowJar) {
Expand All @@ -525,11 +532,11 @@ def configureRelease() {
classifier = null
version = project.version
}
artifactsList = [sourcesJar, javadocJar, shadowJar]
artifactsList = [sourcesJar, javadocJar, testJar, shadowJar]
build.dependsOn shadowJar
} else {
logger.lifecycle("Not including shadow jar.")
artifactsList = [sourcesJar, javadocJar, jar]
artifactsList = [sourcesJar, javadocJar, testJar, jar]
}

artifacts {
Expand Down

0 comments on commit d550e6b

Please sign in to comment.