Skip to content

Commit

Permalink
buildscripts: don't use withSourcesJar()---it includes resources
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed May 19, 2024
1 parent 0657d38 commit 3e6e876
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,9 @@ tasks.withType(JavaExec).configureEach { // Java runtime options:
//jvmArgs '-Xms512m', '-Xmx512m' // to enlarge the Java heap
//jvmArgs '-XX:+UseG1GC', '-XX:MaxGCPauseMillis=10'
}

tasks.register('sourcesJar', Jar) {
archiveClassifier = 'sources'
description 'Creates a JAR of Java sourcecode.'
from sourceSets.main.allJava // default is ".allSource", which include resources
}
2 changes: 1 addition & 1 deletion moon-ccbysa/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ ext {

java {
withJavadocJar()
withSourcesJar()
}

jar { archiveBaseName = project.ext.baseName }
Expand All @@ -35,6 +34,7 @@ tasks.register('pom', Copy) {
publishing {
publications {
maven(MavenPublication) {
artifact sourcesJar
artifactId artifact
from components.java
groupId rootProject.ext.group
Expand Down
2 changes: 1 addition & 1 deletion nifty/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ dependencies {

java {
withJavadocJar()
withSourcesJar()
}

javadoc {
Expand Down Expand Up @@ -92,6 +91,7 @@ tasks.register('pomAsc', Copy) {
publishing {
publications {
maven(MavenPublication) {
artifact sourcesJar
artifactId artifact
from components.java
groupId rootProject.ext.group
Expand Down
2 changes: 1 addition & 1 deletion x/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ dependencies {

java {
withJavadocJar()
withSourcesJar()
}

// Register publishing tasks:
Expand Down Expand Up @@ -81,6 +80,7 @@ tasks.register('pomAsc', Copy) {
publishing {
publications {
maven(MavenPublication) {
artifact sourcesJar
artifactId artifact
from components.java
groupId rootProject.ext.group
Expand Down

0 comments on commit 3e6e876

Please sign in to comment.