Skip to content

Commit

Permalink
Drop support for AGP 7.4 & Gradle 7.x
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszkwiecinski committed Dec 4, 2023
1 parent d808bee commit 4d2f4ef
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 38 deletions.
24 changes: 9 additions & 15 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -87,28 +86,27 @@ jobs:
strategy:
fail-fast: false
matrix:
javaVersion: [ 17, 20 ]
javaVersion: [ 17, 21 ]
gradle: [ release-candidate ]
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:
- uses: actions/checkout@v4
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 }}
Expand All @@ -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
Expand All @@ -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 }}
Expand Down Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/dependency_diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)_

Expand Down
7 changes: 4 additions & 3 deletions easylauncher/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import org.jetbrains.kotlin.gradle.dsl.KotlinCompile
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion

plugins {
id "java-gradle-plugin"
Expand Down Expand Up @@ -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 {
Expand Down
5 changes: 4 additions & 1 deletion gradle/plugins/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import org.jetbrains.kotlin.gradle.dsl.KotlinCompile
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
id 'java-gradle-plugin'
Expand All @@ -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 {
Expand Down
18 changes: 5 additions & 13 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}
}
}
}

Expand Down Expand Up @@ -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")
}

Expand Down Expand Up @@ -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")
}

Expand All @@ -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()
}
}

Expand Down Expand Up @@ -227,7 +219,7 @@ subprojects {

screenshots {
addDeps = false
failureDir = "${buildDir}/failedScreenshots"
failureDir = layout.buildDirectory.map { it.dir("failedScreenshots") }.get().asFile
}

dependencies {
Expand Down

0 comments on commit 4d2f4ef

Please sign in to comment.