Skip to content

Commit

Permalink
Fix all the JVM toolchain stuff (#191)
Browse files Browse the repository at this point in the history
* Fix all the JVM toolchain stuff
* Don't enforce spotless checks
* Use console plain when running gradle, to rmeove the noise.
* Just stay on 17 when we have the foojay toolchain resolver. For maven template I downgraded to 11.
  • Loading branch information
slinkydeveloper authored Sep 4, 2024
1 parent 37ece2c commit 0b48dcc
Show file tree
Hide file tree
Showing 18 changed files with 51 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
jvm-version: [17]
jvm-version: [ 17 ]

steps:
- uses: actions/checkout@v3
Expand Down
24 changes: 12 additions & 12 deletions .tools/run_jvm_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ set -eufx -o pipefail
SELF_PATH=${BASH_SOURCE[0]:-"$(command -v -- "$0")"}
PROJECT_ROOT="$(dirname "$SELF_PATH")/.."

pushd $PROJECT_ROOT/templates/java-gradle && ./gradlew check && popd
pushd $PROJECT_ROOT/templates/java-gradle && ./gradlew --console=plain check && popd
pushd $PROJECT_ROOT/templates/java-maven && mvn verify && popd
pushd $PROJECT_ROOT/templates/kotlin-gradle && ./gradlew check && popd
pushd $PROJECT_ROOT/templates/kotlin-gradle-lambda-cdk/lambda && ./gradlew check && popd
pushd $PROJECT_ROOT/templates/kotlin-gradle && ./gradlew --console=plain check && popd
pushd $PROJECT_ROOT/templates/kotlin-gradle-lambda-cdk/lambda && ./gradlew --console=plain check && popd

pushd $PROJECT_ROOT/basics/basics-java && ./gradlew check && popd
pushd $PROJECT_ROOT/basics/basics-kotlin && ./gradlew check && popd
pushd $PROJECT_ROOT/basics/basics-java && ./gradlew --console=plain check && popd
pushd $PROJECT_ROOT/basics/basics-kotlin && ./gradlew --console=plain check && popd

pushd $PROJECT_ROOT/patterns-use-cases/sagas/sagas-java && ./gradlew check && popd
pushd $PROJECT_ROOT/patterns-use-cases/payment-state-machine/payment-state-machine-java && ./gradlew check && popd
pushd $PROJECT_ROOT/patterns-use-cases/async-signals-payment/async-signals-payment-java && ./gradlew check && popd
pushd $PROJECT_ROOT/patterns-use-cases/integrations/java-spring && ./gradlew check && popd
pushd $PROJECT_ROOT/patterns-use-cases/sagas/sagas-java && ./gradlew --console=plain check && popd
pushd $PROJECT_ROOT/patterns-use-cases/payment-state-machine/payment-state-machine-java && ./gradlew --console=plain check && popd
pushd $PROJECT_ROOT/patterns-use-cases/async-signals-payment/async-signals-payment-java && ./gradlew --console=plain check && popd
pushd $PROJECT_ROOT/patterns-use-cases/integrations/java-spring && ./gradlew --console=plain check && popd

pushd $PROJECT_ROOT/tutorials/tour-of-restate-java && ./gradlew check && popd
pushd $PROJECT_ROOT/tutorials/tour-of-restate-java && ./gradlew --console=plain check && popd

pushd $PROJECT_ROOT/end-to-end-applications/java/food-ordering/app && ./gradlew check && popd
pushd $PROJECT_ROOT/end-to-end-applications/kotlin/food-ordering/app && ./gradlew check && popd
pushd $PROJECT_ROOT/end-to-end-applications/java/food-ordering/app && ./gradlew --console=plain check && popd
pushd $PROJECT_ROOT/end-to-end-applications/kotlin/food-ordering/app && ./gradlew --console=plain check && popd
3 changes: 3 additions & 0 deletions basics/basics-kotlin/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version("0.8.0")
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ tasks.withType<JavaCompile> {

// Code formatting tool
spotless {
isEnforceCheck = false
java {
importOrder()
removeUnusedImports()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version("0.8.0")
}

rootProject.name = "food-ordering-app"
include("restaurant", "restate-app")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ subprojects {

// Code formatting tool
spotless {
isEnforceCheck = false
kotlin {
targetExclude("build/generated/**/*.kt")
ktfmt()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version("0.8.0")
}

rootProject.name = "food-ordering-app"
include("restaurant", "restate-app")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ java {


spotless {
isEnforceCheck = false
java {
importOrder()
removeUnusedImports()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version("0.8.0")
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ tasks.withType<Test> {
}

spotless {
isEnforceCheck = false
java {
googleJavaFormat()
importOrder()
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version("0.8.0")
}

rootProject.name = "java-spring"
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ java {
}

spotless {
isEnforceCheck = false
java {
importOrder()
removeUnusedImports()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version("0.8.0")
}
3 changes: 3 additions & 0 deletions patterns-use-cases/sagas/sagas-java/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version("0.8.0")
}
2 changes: 1 addition & 1 deletion patterns-use-cases/sagas/sagas-kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ dependencies {
// Setup Java/Kotlin compiler target
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
languageVersion.set(JavaLanguageVersion.of(11))
}
}
3 changes: 3 additions & 0 deletions patterns-use-cases/sagas/sagas-kotlin/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version("0.8.0")
}
4 changes: 2 additions & 2 deletions templates/java-maven/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<restate.version>1.0.1</restate.version>
</properties>

Expand Down
3 changes: 3 additions & 0 deletions templates/kotlin-gradle/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version("0.8.0")
}

0 comments on commit 0b48dcc

Please sign in to comment.