Skip to content

Commit

Permalink
fix(build): revert java17 changes (#4750)
Browse files Browse the repository at this point in the history
* Revert "fix(dokka): use version 1.9.20 of org.jetbrains.dokka (#4747)"

This reverts commit af347bb.

since https://github.com/spinnaker/orca/actions/runs/9490289564/job/26153470376 failed with:

Caused by: java.lang.NoSuchMethodError: 'org.jetbrains.dokka.model.DInterface org.jetbrains.dokka.model.DInterface.copy$default(org.jetbrains.dokka.model.DInterface, org.jetbrains.dokka.links.DRI, java.lang.String, java.util.Map, org.jetbrains.dokka.DokkaConfiguration$DokkaSourceSet, java.util.Map, java.util.List, java.util.List, java.util.List, java.util.Map, org.jetbrains.dokka.model.DObject, java.util.List, java.util.Map, java.util.Set, boolean, org.jetbrains.dokka.model.properties.PropertyContainer, int, java.lang.Object)'

Kotlin/dokka#2452 has some info, but I haven’t been able to make it work.

* Revert "chore(build): enable cross compilation plugin for Java 17 (#4738)"

This reverts commit f936de5.

since $ ./gradlew -PenableCrossCompilerPlugin=true clean orca-api:dokkaJavadoc fails
  • Loading branch information
dbyron-sf authored Jun 13, 2024
1 parent af347bb commit 3ec4fb1
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
- uses: actions/setup-java@v4
with:
java-version: |
11
17
11
distribution: 'zulu'
cache: 'gradle'
- name: Prepare build variables
Expand All @@ -38,7 +38,7 @@ jobs:
- name: Build
env:
ORG_GRADLE_PROJECT_version: ${{ steps.build_variables.outputs.VERSION }}
run: ./gradlew -PenableCrossCompilerPlugin=true build --stacktrace ${{ steps.build_variables.outputs.REPO }}-web:installDist
run: ./gradlew build --stacktrace ${{ steps.build_variables.outputs.REPO }}-web:installDist
- name: Build local slim container image for testing
uses: docker/build-push-action@v5
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
- uses: actions/setup-java@v4
with:
java-version: |
11
17
11
distribution: 'zulu'
cache: 'gradle'
- name: Prepare build variables
Expand All @@ -32,7 +32,7 @@ jobs:
- name: Build
env:
ORG_GRADLE_PROJECT_version: ${{ steps.build_variables.outputs.VERSION }}
run: ./gradlew -PenableCrossCompilerPlugin=true build ${{ steps.build_variables.outputs.REPO }}-web:installDist
run: ./gradlew build ${{ steps.build_variables.outputs.REPO }}-web:installDist
- name: Build slim container image
uses: docker/build-push-action@v5
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ jobs:
- uses: actions/setup-java@v4
with:
java-version: |
11
17
11
distribution: 'zulu'
cache: 'gradle'
- name: Assemble release info
Expand All @@ -72,14 +72,14 @@ jobs:
ORG_GRADLE_PROJECT_nexusPgpSigningKey: ${{ secrets.NEXUS_PGP_SIGNING_KEY }}
ORG_GRADLE_PROJECT_nexusPgpSigningPassword: ${{ secrets.NEXUS_PGP_SIGNING_PASSWORD }}
run: |
./gradlew -PenableCrossCompilerPlugin=true --info build ${{ steps.build_variables.outputs.REPO }}-web:installDist publishToNexus closeAndReleaseNexusStagingRepository
./gradlew --info build ${{ steps.build_variables.outputs.REPO }}-web:installDist publishToNexus closeAndReleaseNexusStagingRepository
- name: Publish apt packages to Google Artifact Registry
env:
ORG_GRADLE_PROJECT_version: ${{ steps.release_info.outputs.RELEASE_VERSION }}
ORG_GRADLE_PROJECT_artifactRegistryPublishEnabled: true
GAR_JSON_KEY: ${{ secrets.GAR_JSON_KEY }}
run: |
./gradlew -PenableCrossCompilerPlugin=true --info publish
./gradlew --info publish
- name: Login to Google Cloud
# Only run this on repositories in the 'spinnaker' org, not on forks.
if: startsWith(github.repository, 'spinnaker/')
Expand Down
16 changes: 8 additions & 8 deletions Dockerfile.compile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM ubuntu:bionic
RUN apt-get update && apt-get install -y \
openjdk-11-jdk \
&& rm -rf /var/lib/apt/lists/*
LABEL maintainer="[email protected]"
ENV GRADLE_USER_HOME /workspace/.gradle
ENV GRADLE_OPTS -Xmx6g
CMD ./gradlew -PenableCrossCompilerPlugin=true --no-daemon orca-web:installDist -x test
FROM ubuntu:bionic
RUN apt-get update && apt-get install -y \
openjdk-11-jdk \
&& rm -rf /var/lib/apt/lists/*
LABEL maintainer="[email protected]"
ENV GRADLE_USER_HOME /workspace/.gradle
ENV GRADLE_OPTS -Xmx6g
CMD ./gradlew --no-daemon orca-web:installDist -x test
13 changes: 12 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,25 @@ plugins {
id "org.jetbrains.kotlin.jvm" version "$kotlinVersion" apply false
id "org.jetbrains.kotlin.plugin.allopen" version "$kotlinVersion" apply false
id "io.gitlab.arturbosch.detekt" version "1.17.1" apply false
id "org.jetbrains.dokka" version "1.9.20" apply false
id "org.jetbrains.dokka" version "1.4.32" apply false
}

allprojects {
apply plugin: 'io.spinnaker.project'

group = "io.spinnaker.orca"

tasks.withType(JavaCompile).configureEach {
javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(11)
}
}
tasks.withType(Test).configureEach {
javaLauncher = javaToolchains.launcherFor {
languageVersion = JavaLanguageVersion.of(17)
}
}

tasks.withType(JavaExec) {
if (System.getProperty('DEBUG', 'false') == 'true') {
jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8183'
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kotlinVersion=1.6.21
org.gradle.parallel=true
org.gradle.jvmargs=-Xmx6g
spinnakerGradleVersion=8.32.1
targetJava17=false
targetJava11=true

# To enable a composite reference to a project, set the
# project property `'<projectName>Composite=true'`.
Expand Down
2 changes: 1 addition & 1 deletion gradle/dokka.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ apply plugin: "org.jetbrains.dokka"
dokkaHtml {
dokkaSourceSets {
configureEach {
jdkVersion.set(17)
jdkVersion.set(11)
}
}
}
4 changes: 2 additions & 2 deletions orca-api/orca-api.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

plugins {
id("net.ltgt.errorprone") version "4.0.0"
id("net.ltgt.errorprone") version "1.2.1"
}

apply from: "$rootDir/gradle/kotlin.gradle"
Expand All @@ -28,7 +28,7 @@ sourceSets {
}

dependencies {
errorprone("com.google.errorprone:error_prone_core:2.28.0")
errorprone("com.google.errorprone:error_prone_core:2.4.0")

implementation platform("io.spinnaker.kork:kork-bom:$korkVersion")
annotationProcessor platform("io.spinnaker.kork:kork-bom:$korkVersion")
Expand Down

0 comments on commit 3ec4fb1

Please sign in to comment.