-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Convention Plugins for Java Modules
- Loading branch information
Showing
22 changed files
with
183 additions
and
237 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# override defaults as there are multiple options | ||
jakarta.activation=com.sun.activation:jakarta.activation | ||
jakarta.mail=com.sun.mail:jakarta.mail |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
gradle/plugins/src/main/kotlin/org.example.gradle.base.module-system-rules.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
plugins { id("org.gradlex.extra-java-module-info") } | ||
|
||
extraJavaModuleInfo { | ||
failOnAutomaticModules = true | ||
|
||
module("com.github.virtuald:curvesapi", "com.github.virtuald.curvesapi") | ||
module("com.google.code.findbugs:jsr305", "javax.annotations.jsr305") | ||
module("com.google.errorprone:error_prone_annotations", "com.google.errorprone.annotations") | ||
module("com.google.guava:failureaccess", "com.google.common.internal.failureaccess") | ||
module("com.google.guava:guava", "com.google.common") | ||
module("com.zaxxer:SparseBitSet", "SparseBitSet") | ||
module("commons-codec:commons-codec", "org.apache.commons.codec") | ||
module("commons-io:commons-io", "org.apache.commons.io") | ||
module("org.apache.commons:commons-collections4", "org.apache.commons.collections4") | ||
module("org.apache.commons:commons-compress", "org.apache.commons.compress") | ||
module("org.apache.commons:commons-lang3", "org.apache.commons.lang3") | ||
module("org.apache.commons:commons-math3", "commons.math3") | ||
module("org.apache.velocity:velocity-engine-core", "velocity.engine.core") | ||
module("org.hamcrest:hamcrest-core", "org.hamcrest.core") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 1 addition & 8 deletions
9
gradle/plugins/src/main/kotlin/org.example.gradle.check.format-gradle.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
gradle/plugins/src/main/kotlin/org.example.gradle.component.library.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
plugins { | ||
id("org.gradle.java-library") | ||
id("org.example.gradle.base.dependency-rules") | ||
id("org.example.gradle.base.module-system-rules") | ||
id("org.example.gradle.base.identity") | ||
id("org.example.gradle.base.lifecycle") | ||
id("org.example.gradle.check.dependencies") | ||
id("org.example.gradle.check.format-gradle") | ||
id("org.example.gradle.check.format-java") | ||
id("org.example.gradle.feature.compile-java") | ||
id("org.example.gradle.feature.javadoc") | ||
id("org.example.gradle.feature.jpackage") | ||
id("org.example.gradle.feature.test") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
gradle/plugins/src/main/kotlin/org.example.gradle.feature.jpackage.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
plugins { id("org.gradlex.java-module-packaging") } | ||
|
||
// Multi target support and packaging | ||
javaModulePackaging { | ||
target("ubuntu-22.04") { | ||
operatingSystem = OperatingSystemFamily.LINUX | ||
architecture = MachineArchitecture.X86_64 | ||
packageTypes = listOf("deb") | ||
} | ||
target("macos-13") { | ||
operatingSystem = OperatingSystemFamily.MACOS | ||
architecture = MachineArchitecture.X86_64 | ||
packageTypes = listOf("dmg") | ||
} | ||
target("macos-14") { | ||
operatingSystem = OperatingSystemFamily.MACOS | ||
architecture = MachineArchitecture.ARM64 | ||
packageTypes = listOf("dmg") | ||
} | ||
target("windows-2022") { | ||
operatingSystem = OperatingSystemFamily.WINDOWS | ||
architecture = MachineArchitecture.X86_64 | ||
packageTypes = listOf("exe") | ||
} | ||
|
||
primaryTarget(target("macos-14")) | ||
} |
24 changes: 12 additions & 12 deletions
24
.../plugins/src/main/kotlin/org.example.gradle.feature.project-structure.settings.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
// Include all subfolders that contain a 'build.gradle.kts' as subprojects | ||
rootDir | ||
.listFiles() | ||
?.filter { File(it, "build.gradle.kts").exists() } | ||
?.forEach { subproject -> include(subproject.name) } | ||
import org.gradlex.javamodule.dependencies.initialization.JavaModulesExtension | ||
|
||
// Platform project | ||
include(":versions") | ||
plugins { id("org.gradlex.java-module-dependencies") } | ||
|
||
project(":versions").projectDir = file("gradle/versions") | ||
configure<JavaModulesExtension> { | ||
directory(".") { | ||
// Set the group required to refer to a Module "from outside". | ||
// I.e., when it is published or used in Included Builds. | ||
group = "org.example.product.javamodules" | ||
} | ||
versions("gradle/versions") | ||
|
||
// Aggregation and analysis project to create reports about the whole software (coverage, SBOM, ...) | ||
include(":aggregation") | ||
|
||
project(":aggregation").projectDir = file("gradle/aggregation") | ||
// Analysis project to create reports about the whole software (coverage, SBOM, ...) | ||
module("gradle/aggregation") | ||
} | ||
|
||
// Allow local projects to be referred to by accessor | ||
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") |
1 change: 1 addition & 0 deletions
1
gradle/plugins/src/main/kotlin/org.example.gradle.feature.test.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 0 additions & 13 deletions
13
...le/plugins/src/main/kotlin/org.example.gradle.feature.use-all-catalog-versions.gradle.kts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.