-
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.
- Loading branch information
Showing
122 changed files
with
1,241 additions
and
1,331 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,15 +4,35 @@ jobs: | |
gradle-build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: git clone | ||
uses: actions/[email protected] | ||
- name: Set up JDK | ||
uses: actions/[email protected] | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
- name: gradle build | ||
id: gradle | ||
uses: gradle/[email protected] | ||
java-version-file: gradle/jdk-version.txt | ||
- uses: gradle/actions/setup-gradle@v3 | ||
- run: "./gradlew qualityCheck" | ||
env: | ||
BUILD_CACHE_USER: ${{ secrets.BUILD_CACHE_USER }} | ||
BUILD_CACHE_PWD: ${{ secrets.BUILD_CACHE_PWD }} | ||
- run: "./gradlew test" | ||
env: | ||
BUILD_CACHE_USER: ${{ secrets.BUILD_CACHE_USER }} | ||
BUILD_CACHE_PWD: ${{ secrets.BUILD_CACHE_PWD }} | ||
- run: "./gradlew endToEndTest" | ||
env: | ||
BUILD_CACHE_USER: ${{ secrets.BUILD_CACHE_USER }} | ||
BUILD_CACHE_PWD: ${{ secrets.BUILD_CACHE_PWD }} | ||
- run: "./gradlew endToEndTestSlow" | ||
env: | ||
BUILD_CACHE_USER: ${{ secrets.BUILD_CACHE_USER }} | ||
BUILD_CACHE_PWD: ${{ secrets.BUILD_CACHE_PWD }} | ||
- uses: DependencyTrack/gh-upload-sbom@v3 | ||
with: | ||
arguments: build | ||
apiKey: ${{ secrets.DEPENDENCYTRACK_APIKEY }} | ||
bomFilename: "gradle/aggregation/build/reports/sbom/bom.xml" | ||
serverHostname: "212.132.95.131:8091" | ||
port: "8091" | ||
protocol: "http" | ||
projectName: "gradle-project-setup-howto" | ||
projectVersion: ${{ github.ref_name }} | ||
autoCreate: true |
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,32 +1,27 @@ | ||
plugins { | ||
id("org.example.application") | ||
} | ||
plugins { id("org.example.gradle.component.java-application") } | ||
|
||
application { | ||
mainClass.set("org.example.product.app.Application") | ||
} | ||
application { mainClass = "org.example.product.app.Application" } | ||
|
||
// Complicated notation for 'capabilities' - upvote: https://github.com/gradle/gradle/issues/25629 | ||
dependencies { | ||
providedCompile("jakarta.servlet:jakarta.servlet-api") | ||
|
||
implementation(project(":bespin")) | ||
implementation(project(":corellia")) | ||
implementation(project(":kamino")) | ||
implementation(project(":kashyyyk")) | ||
implementation(project(":naboo")) | ||
implementation(project(":tatooine")) | ||
implementation("com.google.inject.extensions:guice-servlet") | ||
implementation("com.google.inject:guice") | ||
implementation("org.slf4j:slf4j-api") | ||
|
||
mockApiImplementation(project(path)) | ||
mockApiImplementation("com.google.guava:guava") | ||
implementation(projects.bespin) | ||
implementation(projects.corellia) | ||
implementation(projects.kamino) | ||
implementation(projects.kashyyyk) | ||
implementation(projects.naboo) | ||
implementation(projects.tatooine) | ||
implementation(libs.guice) | ||
implementation(libs.guice.servlet) | ||
implementation(libs.slf4j.api) | ||
runtimeOnly(libs.slf4j.simple) | ||
providedCompile(libs.jakarta.servlet.api) | ||
|
||
testImplementation("org.junit.jupiter:junit-jupiter-api") | ||
endToEndTestImplementation(projects.app) { capabilities { requireCapability("${project.group}:$name-mock-api") } } | ||
endToEndTestImplementation(libs.guava) | ||
endToEndTestImplementation(libs.junit.jupiter.api) | ||
|
||
endToEndTestImplementation(project(path)) { capabilities { requireCapabilities("${project.group}:${project.name}-mock-api") } } | ||
endToEndTestImplementation("com.google.guava:guava") | ||
endToEndTestImplementation("org.junit.jupiter:junit-jupiter-api") | ||
mockApiImplementation(projects.app) | ||
mockApiImplementation(libs.guava) | ||
|
||
runtimeOnly("org.slf4j:slf4j-simple") | ||
testImplementation(libs.junit.jupiter.api) | ||
} |
4 changes: 2 additions & 2 deletions
4
app/src/endToEndTest/java/org/example/product/app/endtoend/SystemQuickTest.java
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
4 changes: 2 additions & 2 deletions
4
app/src/endToEndTest/java/org/example/product/app/endtoend/SystemTest.java
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
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 |
---|---|---|
|
@@ -9,5 +9,4 @@ public ImmutableList<String> get() { | |
new MainModule(); | ||
return ImmutableList.of("a", "b", "x", "y"); | ||
} | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
plugins { | ||
id("org.example.java-library") | ||
} | ||
plugins { id("org.example.gradle.component.java-library") } | ||
|
||
// For isolated-projects, use 'requireCapability' notation instead of testFixtures(...) | ||
dependencies { | ||
api(project(":corellia")) | ||
|
||
implementation(project(":coruscant")) | ||
implementation("org.apache.velocity:velocity-engine-core") | ||
api(projects.corellia) | ||
implementation(projects.coruscant) | ||
implementation(libs.velocity.engine.core) | ||
|
||
testImplementation(testFixtures(project(":corellia"))) | ||
testImplementation("org.junit.jupiter:junit-jupiter-api") | ||
testImplementation(projects.corellia) { capabilities { requireCapability("${project.group}:$name-test-fixtures") } } | ||
testImplementation(libs.junit.jupiter.api) | ||
} |
7 changes: 3 additions & 4 deletions
7
bespin/src/main/java/org/example/product/bespin/BespinModule.java
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
4 changes: 2 additions & 2 deletions
4
bespin/src/test/java/org/example/product/bespin/test/BespinModuleTest.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
plugins { | ||
id("org.example.root") | ||
id("org.example.gradle.base.lifecycle.root") | ||
id("org.example.gradle.check.dependencies.root") | ||
id("org.example.gradle.check.format-gradle.root") | ||
} |
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,15 +1,15 @@ | ||
plugins { | ||
id("org.example.java-library-with-test-fixtures") | ||
id("org.example.gradle.component.java-library") | ||
id("org.example.gradle.feature.test-fixtures") | ||
} | ||
|
||
dependencies { | ||
api("org.apache.poi:poi") | ||
api(libs.poi) | ||
implementation(libs.commons.io) | ||
implementation(libs.poi.ooxml) | ||
|
||
implementation("commons-io:commons-io") | ||
implementation("org.apache.poi:poi-ooxml") | ||
testImplementation(libs.junit.jupiter.api) | ||
|
||
testFixturesApi("com.google.code.findbugs:jsr305") | ||
testFixturesApi("com.google.guava:guava") | ||
|
||
testImplementation("org.junit.jupiter:junit-jupiter-api") | ||
testFixturesApi(libs.guava) | ||
testFixturesApi(libs.jsr305) | ||
} |
2 changes: 0 additions & 2 deletions
2
...application/tasks/MD5DirectoryChecksum.kt → ...lia/src/main/java/MD5DirectoryChecksum.kt
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
7 changes: 3 additions & 4 deletions
7
corellia/src/main/java/org/example/product/corellia/CorelliaModule.java
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
5 changes: 2 additions & 3 deletions
5
corellia/src/test/java/org/example/product/corellia/test/CorelliaModuleTest.java
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,15 +1,14 @@ | ||
package org.example.product.corellia.test; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
import org.example.product.corellia.fixtures.CorelliaModuleFixture; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
public class CorelliaModuleTest { | ||
|
||
@Test | ||
void testModule() { | ||
assertEquals(3, new CorelliaModuleFixture().threeModules().size()); | ||
} | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
plugins { | ||
id("org.example.java-library-published") | ||
id("org.example.gradle.component.java-library") | ||
id("org.example.gradle.feature.publish") | ||
} | ||
|
||
dependencies { | ||
api("com.fasterxml.jackson.core:jackson-annotations") | ||
api("com.fasterxml.jackson.core:jackson-databind") | ||
api("com.google.guava:guava") | ||
api("jakarta.inject:jakarta.inject-api") | ||
api("org.json:json") | ||
api("org.opensaml:opensaml") | ||
api(libs.guava) | ||
api(libs.jackson.annotations) | ||
api(libs.jackson.databind) | ||
api(libs.jakarta.inject.api) | ||
api(libs.opensaml) | ||
api(libs.org.json) | ||
implementation(libs.httpcomponents.fluent.hc) | ||
implementation(libs.jackson.core) | ||
implementation(libs.jackson.datatype.json.org) | ||
implementation(libs.jackson.datatype.jsr310) | ||
implementation(libs.jakarta.activation) | ||
implementation(libs.jakarta.mail.impl) | ||
implementation(libs.org.reflections) | ||
implementation(libs.slf4j.api) | ||
|
||
implementation("com.fasterxml.jackson.core:jackson-core") | ||
implementation("com.fasterxml.jackson.datatype:jackson-datatype-json-org") | ||
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310") | ||
implementation("com.sun.activation:jakarta.activation") | ||
implementation("com.sun.mail:jakarta.mail") | ||
implementation("org.apache.httpcomponents:fluent-hc") | ||
implementation("org.reflections:reflections") | ||
implementation("org.slf4j:slf4j-api") | ||
|
||
testImplementation("org.assertj:assertj-core") | ||
testImplementation("org.junit.jupiter:junit-jupiter-api") | ||
testImplementation(libs.assertj.core) | ||
testImplementation(libs.junit.jupiter.api) | ||
} |
Oops, something went wrong.