Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrades to Java 11, Gradle 8.9, AGP 8.6.1, and Kotlin 1.9.25 #263

Merged
merged 7 commits into from
Nov 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci_test_and_publish.yml
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
java-version: '17'

- name: Upload Artifacts
run: ./gradlew publishAllPublicationsToMavenCentralRepository --no-daemon --no-parallel
@@ -60,7 +60,7 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
java-version: '17'
- name: Run tests
uses: reactivecircus/android-emulator-runner@v2
with:
2 changes: 1 addition & 1 deletion .github/workflows/sample_app.yml
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
java-version: '17'
- name: Build sample
run: |
./gradlew :affectedmoduledetector:publishToMavenLocal
10 changes: 7 additions & 3 deletions affectedmoduledetector/build.gradle
Original file line number Diff line number Diff line change
@@ -9,12 +9,16 @@ plugins {
apply from: rootProject.file("gradle/jacoco.gradle")

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

kotlin {
jvmToolchain(11)
}

jacoco {
toolVersion = "0.8.8"
toolVersion = "0.8.10"
}

gradlePlugin {
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@ import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.Task
import org.gradle.api.tasks.testing.Test
import org.gradle.internal.impldep.org.jetbrains.annotations.VisibleForTesting
import org.gradle.util.GradleVersion
import org.jetbrains.annotations.VisibleForTesting

/**
* This plugin creates and registers all affected test tasks.
Original file line number Diff line number Diff line change
@@ -60,8 +60,8 @@ class AffectedModuleDetectorIntegrationTest {
| jcenter()
| }
| dependencies {
| classpath "com.android.tools.build:gradle:4.1.0"
| classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10"
| classpath "com.android.tools.build:gradle:7.4.0"
| classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.25"
| }
|}
|plugins {
@@ -81,14 +81,22 @@ class AffectedModuleDetectorIntegrationTest {
| id 'kotlin-android'
| }
| android {
| compileSdkVersion 30
| buildToolsVersion "30.0.2"
| compileSdkVersion 33
| namespace "sample"
| }
| dependencies {
| implementation project(":sample-core")
| }""".trimMargin()
)

tmpFolder.newFolder("sample-app/src/main/")
tmpFolder.newFile("sample-app/src/main/AndroidManifest.xml").writeText(
"""
|<manifest>
|</manifest>
""".trimMargin()
)

tmpFolder.newFile("sample-core/build.gradle").writeText(
"""plugins {
| id 'com.android.library'
@@ -98,11 +106,19 @@ class AffectedModuleDetectorIntegrationTest {
| assembleAndroidTestTask = "assembleAndroidTest"
| }
| android {
| compileSdkVersion 30
| buildToolsVersion "30.0.2"
| namespace 'sample.core'
| compileSdkVersion 33
| }""".trimMargin()
)

tmpFolder.newFolder("sample-core/src/main/")
tmpFolder.newFile("sample-core/src/main/AndroidManifest.xml").writeText(
"""
|<manifest>
|</manifest>
""".trimMargin()
)

// WHEN
val result = GradleRunner.create()
.withProjectDir(tmpFolder.root)
@@ -138,8 +154,8 @@ class AffectedModuleDetectorIntegrationTest {
| jcenter()
| }
| dependencies {
| classpath "com.android.tools.build:gradle:4.1.0"
| classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10"
| classpath "com.android.tools.build:gradle:7.4.0"
| classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.25"
| }
|}
|plugins {
@@ -162,14 +178,22 @@ class AffectedModuleDetectorIntegrationTest {
| id 'kotlin-android'
| }
| android {
| compileSdkVersion 30
| buildToolsVersion "30.0.2"
| namespace 'sample'
| compileSdkVersion 33
| }
| dependencies {
| implementation project(":sample-core")
| }""".trimMargin()
)

tmpFolder.newFolder("sample-app/src/main/")
tmpFolder.newFile("sample-app/src/main/AndroidManifest.xml").writeText(
"""
|<manifest>
|</manifest>
""".trimMargin()
)

tmpFolder.newFile("sample-core/build.gradle").writeText(
"""plugins {
| id 'com.android.library'
@@ -179,11 +203,19 @@ class AffectedModuleDetectorIntegrationTest {
| assembleAndroidTestTask = "assembleAndroidTest"
| }
| android {
| compileSdkVersion 30
| buildToolsVersion "30.0.2"
| namespace 'sample.core'
| compileSdkVersion 33
| }""".trimMargin()
)

tmpFolder.newFolder("sample-core/src/main/")
tmpFolder.newFile("sample-core/src/main/AndroidManifest.xml").writeText(
"""
|<manifest>
|</manifest>
""".trimMargin()
)

// WHEN
val result = GradleRunner.create()
.withProjectDir(tmpFolder.root)
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = "1.6.20"
ext.kotlin_version = "1.9.25"
repositories {
google()
mavenCentral()
@@ -9,10 +9,10 @@ buildscript {
}
}
dependencies {
classpath "com.android.tools.build:gradle:7.3.1"
classpath "com.android.tools.build:gradle:8.6.1"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath("org.jlleitschuh.gradle:ktlint-gradle:10.2.1")
classpath("org.jacoco:org.jacoco.core:0.8.8")
classpath("org.jlleitschuh.gradle:ktlint-gradle:11.4.2")
classpath("org.jacoco:org.jacoco.core:0.8.10")
classpath "com.vanniktech:gradle-maven-publish-plugin:0.19.0"
}
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ kotlin.code.style=official

# POM
GROUP = com.dropbox.affectedmoduledetector
VERSION_NAME=0.3.2-SNAPSHOT
VERSION_NAME=0.4.0-SNAPSHOT

POM_ARTIFACT_ID = affectedmoduledetector
POM_NAME = Affected Module Detector
4 changes: 2 additions & 2 deletions gradle/jacoco.gradle
Original file line number Diff line number Diff line change
@@ -47,9 +47,9 @@ project.afterEvaluate {
executionData.setFrom files(coverageData)

reports {
xml.enabled = true
xml.required = true
xml.destination = file("${buildDir}/reports/jacoco/report.xml")
html.enabled = true
html.required = true
}
}

Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Thu Oct 15 15:49:37 PDT 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
Loading