diff --git a/.github/workflows/tutorial.yml b/.github/workflows/tutorial.yml index 0249b2b26..5f7cd4105 100644 --- a/.github/workflows/tutorial.yml +++ b/.github/workflows/tutorial.yml @@ -11,6 +11,11 @@ jobs: - uses: actions/setup-python@v2 with: python-version: 3.x + - name: Set up JDK + uses: actions/setup-java@v2 + with: + distribution: 'adopt' + java-version: 17 - run: pip install mkdocs-material - run: pip install mkdocs-static-i18n==0.56 - run: mkdocs gh-deploy --force diff --git a/artifacts/adbserver-desktop.jar b/artifacts/adbserver-desktop.jar index 2b9127b73..50e1345fb 100644 Binary files a/artifacts/adbserver-desktop.jar and b/artifacts/adbserver-desktop.jar differ diff --git a/build-logic/android/src/main/kotlin/convention.android-app.gradle.kts b/build-logic/android/src/main/kotlin/convention.android-app.gradle.kts index 53847f2f5..a0dd0cd71 100644 --- a/build-logic/android/src/main/kotlin/convention.android-app.gradle.kts +++ b/build-logic/android/src/main/kotlin/convention.android-app.gradle.kts @@ -9,8 +9,8 @@ plugins { android { compileOptions { - targetCompatibility = JavaVersion.VERSION_17 - sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_1_8 } testBuildType = "debug" @@ -35,14 +35,10 @@ android { buildFeatures { viewBinding = true // for the samples } - - kotlin { - jvmToolchain(JavaVersion.VERSION_17.majorVersion.toInt()) - } } tasks.withType().configureEach { kotlinOptions { - jvmTarget = JavaVersion.VERSION_17.toString() + jvmTarget = JavaVersion.VERSION_1_8.toString() } } diff --git a/build-logic/android/src/main/kotlin/convention.android-base.gradle.kts b/build-logic/android/src/main/kotlin/convention.android-base.gradle.kts index f0bcf38ae..3376cbd1f 100644 --- a/build-logic/android/src/main/kotlin/convention.android-base.gradle.kts +++ b/build-logic/android/src/main/kotlin/convention.android-base.gradle.kts @@ -6,8 +6,8 @@ configure { compileSdkVersion(34) compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 } defaultConfig { diff --git a/build-logic/android/src/main/kotlin/convention.android-library.gradle.kts b/build-logic/android/src/main/kotlin/convention.android-library.gradle.kts index 738fd02bb..f43dea865 100644 --- a/build-logic/android/src/main/kotlin/convention.android-library.gradle.kts +++ b/build-logic/android/src/main/kotlin/convention.android-library.gradle.kts @@ -21,13 +21,13 @@ android { } compileOptions { - targetCompatibility = JavaVersion.VERSION_17 - sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_1_8 } } tasks.withType().configureEach { kotlinOptions { - jvmTarget = JavaVersion.VERSION_17.toString() + jvmTarget = JavaVersion.VERSION_1_8.toString() } } diff --git a/build-logic/kotlin/src/main/kotlin/convention.kotlin-base.gradle.kts b/build-logic/kotlin/src/main/kotlin/convention.kotlin-base.gradle.kts index d3fab73d8..19376fbb4 100644 --- a/build-logic/kotlin/src/main/kotlin/convention.kotlin-base.gradle.kts +++ b/build-logic/kotlin/src/main/kotlin/convention.kotlin-base.gradle.kts @@ -6,7 +6,7 @@ val kotlinLanguageVersion = "1.8" tasks.withType().configureEach { kotlinOptions { - jvmTarget = JavaVersion.VERSION_11.toString() + jvmTarget = JavaVersion.VERSION_1_8.toString() // TODO: fix all warnings before // allWarningsAsErrors = true @@ -21,6 +21,6 @@ tasks.withType().configureEach { } tasks.withType().configureEach { - sourceCompatibility = JavaVersion.VERSION_11.toString() - targetCompatibility = JavaVersion.VERSION_11.toString() + sourceCompatibility = JavaVersion.VERSION_1_8.toString() + targetCompatibility = JavaVersion.VERSION_1_8.toString() } diff --git a/build-logic/publication/src/main/kotlin/convention.sonatype.gradle.kts b/build-logic/publication/src/main/kotlin/convention.sonatype.gradle.kts index f54d2eeab..73e28d5d2 100644 --- a/build-logic/publication/src/main/kotlin/convention.sonatype.gradle.kts +++ b/build-logic/publication/src/main/kotlin/convention.sonatype.gradle.kts @@ -41,10 +41,10 @@ signing { useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword) } -//tasks.withType().configureEach { +// tasks.withType().configureEach { // onlyIf { // val isReleaseQueued = gradle.taskGraph.hasTask("publishAllPublicationsTo${sonatypeReleasesRepoName}Repository") // val isSnapshotQueued = gradle.taskGraph.hasTask("publishAllPublicationsTo${sonatypeSnapshotsRepoName}Repository") // isReleaseQueued || isSnapshotQueued // } -//} +// } diff --git a/settings.gradle.kts b/settings.gradle.kts index 6a399b679..5fb8856ce 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -11,6 +11,10 @@ pluginManagement { } } +plugins { + id("org.gradle.toolchains.foojay-resolver-convention") version "0.4.0" +} + dependencyResolutionManagement { @Suppress("UnstableApiUsage") repositories { diff --git a/tutorial/build.gradle.kts b/tutorial/build.gradle.kts index e49421707..9c294ef83 100644 --- a/tutorial/build.gradle.kts +++ b/tutorial/build.gradle.kts @@ -21,6 +21,12 @@ android { testOptions { execution = "ANDROIDX_TEST_ORCHESTRATOR" } + + java { + toolchain { + languageVersion.set(JavaLanguageVersion.of(8)) + } + } } dependencies {