diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index e497d5c8..13fe262f 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -20,8 +20,7 @@ jobs: with: fetch-depth: 0 - - name: set up JDK - uses: actions/setup-java@v4 + - uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: 20 @@ -92,14 +91,14 @@ jobs: agp: ${{ fromJSON(needs.provide-agp-version-matrix.outputs.agp-versions) }} include: - javaVersion: 11 - gradle: 7.5 - agp: 7.4.1 + gradle: "8.0" + agp: 8.0.0 - javaVersion: 17 gradle: current - agp: 7.4.1 + agp: 8.0.0 - javaVersion: 19 gradle: current - agp: 7.4.1 + agp: 8.0.0 name: Run Gradle-${{ matrix.gradle }}, AGP-${{ matrix.agp }}, Java-${{ matrix.javaVersion }} steps: @@ -107,8 +106,7 @@ jobs: with: fetch-depth: 0 - - name: set up JDK - uses: actions/setup-java@v4 + - uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: ${{ matrix.javaVersion }} @@ -119,8 +117,6 @@ jobs: printf "org.gradle.jvmargs=-Xmx3G -XX:+UseParallelGC\n" >> ~/.gradle/gradle.properties shell: bash - - uses: android-actions/setup-android@v2 - - uses: gradle/gradle-build-action@v2 - name: Pre-compile plugin @@ -146,8 +142,7 @@ jobs: with: fetch-depth: 0 - - name: set up JDK - uses: actions/setup-java@v4 + - uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: ${{ matrix.javaVersion }} @@ -176,8 +171,7 @@ jobs: with: fetch-depth: 0 - - name: set up JDK - uses: actions/setup-java@v4 + - uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: 20 diff --git a/.github/workflows/dependency_diff.yml b/.github/workflows/dependency_diff.yml index b7bdf328..8df4176a 100644 --- a/.github/workflows/dependency_diff.yml +++ b/.github/workflows/dependency_diff.yml @@ -12,8 +12,7 @@ jobs: with: fetch-depth: 0 - - name: set up JDK - uses: actions/setup-java@v4 + - uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: 20 diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml index 1d052c1b..90cba0b5 100644 --- a/.github/workflows/publish_release.yml +++ b/.github/workflows/publish_release.yml @@ -14,8 +14,7 @@ jobs: with: fetch-depth: 0 - - name: Set up JDK - uses: actions/setup-java@v4 + - uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: 20 diff --git a/README.md b/README.md index f3a3680c..a51327da 100644 --- a/README.md +++ b/README.md @@ -218,8 +218,8 @@ See [related issue](https://github.com/usefulness/easylauncher-gradle-plugin/iss ## Requirements Minimal requirements for the plugin are: -- Gradle: **7.5** -- Android Gradle Plugin: **7.4.1** +- Gradle: **8.0** +- Android Gradle Plugin: **8.0.0** - Java Version: **11** - minSdkVersion: **26** _(theoretically there should be no lower boundary - it just hasn't been tested)_ diff --git a/easylauncher/build.gradle b/easylauncher/build.gradle index cc75ec25..10c63723 100644 --- a/easylauncher/build.gradle +++ b/easylauncher/build.gradle @@ -1,4 +1,5 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinCompile +import org.jetbrains.kotlin.gradle.dsl.KotlinVersion plugins { id "java-gradle-plugin" @@ -42,9 +43,9 @@ tasks.withType(PluginUnderTestMetadata).configureEach { } tasks.withType(KotlinCompile).configureEach { - kotlinOptions { - apiVersion = "1.4" - languageVersion = "1.4" + compilerOptions { + apiVersion = KotlinVersion.KOTLIN_1_4 + languageVersion = KotlinVersion.KOTLIN_1_4 } } kotlin { diff --git a/easylauncher/src/test/kotlin/com/project/starter/easylauncher/plugin/EasyLauncherPluginTest.kt b/easylauncher/src/test/kotlin/com/project/starter/easylauncher/plugin/EasyLauncherPluginTest.kt index 02a93db5..e6c54e9a 100644 --- a/easylauncher/src/test/kotlin/com/project/starter/easylauncher/plugin/EasyLauncherPluginTest.kt +++ b/easylauncher/src/test/kotlin/com/project/starter/easylauncher/plugin/EasyLauncherPluginTest.kt @@ -234,7 +234,7 @@ internal class EasyLauncherPluginTest : WithGradleProjectTest() { val cleanRun = runTask("assembleDebug", "--configuration-cache", skipJacoco = true) assertThat(cleanRun.task(":app:easylauncherDebug")?.outcome).isEqualTo(TaskOutcome.SUCCESS) - assertThat(cleanRun.output).contains("Calculating task graph as no configuration cache is available for tasks") + assertThat(cleanRun.output).contains("Calculating task graph as no cached configuration is available for tasks") val secondRun = runTask("assembleDebug", "--configuration-cache", skipJacoco = true) assertThat(secondRun.task(":app:easylauncherDebug")?.outcome).isEqualTo(TaskOutcome.UP_TO_DATE) diff --git a/gradle/plugins/build.gradle b/gradle/plugins/build.gradle index aad63353..697eb3dc 100644 --- a/gradle/plugins/build.gradle +++ b/gradle/plugins/build.gradle @@ -1,4 +1,5 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinCompile +import org.jetbrains.kotlin.gradle.dsl.JvmTarget plugins { id 'java-gradle-plugin' @@ -11,7 +12,9 @@ tasks.withType(JavaCompile).configureEach { options.release.set(targetJavaVersion.majorVersion.toInteger()) } tasks.withType(KotlinCompile).configureEach { - kotlinOptions.jvmTarget = targetJavaVersion + compilerOptions { + jvmTarget = JvmTarget.@Companion.fromTarget(targetJavaVersion.toString()) + } } dependencies { diff --git a/sample/build.gradle b/sample/build.gradle index bcbe1012..09d02dcf 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -31,14 +31,6 @@ buildscript { } } } - if (agpVersion != null && agpVersion.startsWith("7.4")) { - logger.quiet("using kotlin 1.8") - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin") { - version { - strictly("1.8.21") - } - } - } } } @@ -95,7 +87,7 @@ subprojects { lintOptions { disable("VectorPath", "HardcodedText", "IconDuplicates", "ContentDescription") - if (agpVersion == "" || agpVersion.startsWith("7.4") || agpVersion.startsWith("8")) { + if (agpVersion == "" || agpVersion.startsWith("8")) { disable("MonochromeLauncherIcon") } @@ -180,7 +172,7 @@ subprojects { lintOptions { disable("VectorPath", "HardcodedText", "IconDuplicates", "ContentDescription") - if (agpVersion == "" || agpVersion.startsWith("7.4") || agpVersion.startsWith("8")) { + if (agpVersion == "" || agpVersion.startsWith("8")) { disable("MonochromeLauncherIcon") } @@ -190,11 +182,11 @@ subprojects { tasks.register("recordAll", Copy) { group = 'screenshot test' - from "build/screenshots_tmp/" + from layout.buildDirectory.map { it.dir("screenshots_tmp") } into "screenshots/" doLast { - file("build/screenshots_tmp/").deleteDir() + layout.buildDirectory.map { it.dir("screenshots_tmp") }.get().deleteDir() } } @@ -227,7 +219,7 @@ subprojects { screenshots { addDeps = false - failureDir = "${buildDir}/failedScreenshots" + failureDir = layout.buildDirectory.map { it.dir("failedScreenshots") }.get().asFile } dependencies {