Skip to content

Commit

Permalink
Test against AGP 8.9 alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
MGaetan89 committed Jan 12, 2025
1 parent 6df0bfa commit 06c57cc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import org.gradle.jvm.toolchain.JavaLanguageVersion
import org.gradle.plugin.devel.GradlePluginDevelopmentExtension
import org.gradle.plugins.signing.Sign
import org.gradle.plugins.signing.SigningExtension
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import java.util.Locale

@Suppress("unused")
Expand Down Expand Up @@ -50,6 +52,13 @@ class ConventionPlugin : Plugin<Project> {
}
}

tasks.withType(KotlinCompile::class.java).configureEach {
it.compilerOptions {
apiVersion.set(KotlinVersion.KOTLIN_1_9)
languageVersion.set(KotlinVersion.KOTLIN_1_9)
}
}

// We only use the Jupiter platform (JUnit 5)
configurations.all {
it.exclude(mapOf("group" to "junit", "module" to "junit"))
Expand Down
6 changes: 2 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ grammar = "0.5"
guava = "33.3.1-jre"
java = "11"
junit = "5.10.2"
# TODO: sync these two:
kotlin = "1.9.25"
kotlinMetadata = "2.0.21"
kotlin = "2.0.21"

# Cannot be called kotlin-editor as it causes `libs.versions.kotlin.get()` to fail
kotlineditor-core = "0.18"
Expand Down Expand Up @@ -57,7 +55,7 @@ kotlin-gradle = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.
kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin" }
kotlin-stdlib-core = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
kotlin-stdlib-jdk8 = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin" }
kotlin-metadata-jvm = { module = "org.jetbrains.kotlin:kotlin-metadata-jvm", version.ref = "kotlinMetadata" }
kotlin-metadata-jvm = { module = "org.jetbrains.kotlin:kotlin-metadata-jvm", version.ref = "kotlin" }

moshi-core = { module = "com.squareup.moshi:moshi", version.ref = "moshi" }
moshi-kotlin = { module = "com.squareup.moshi:moshi-kotlin", version.ref = "moshi" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,23 @@ abstract class AbstractAndroidSpec extends AbstractFunctionalSpec {
protected static final AGP_8_6 = AgpVersion.version('8.6.1')
protected static final AGP_8_7 = AgpVersion.version('8.7.3')
protected static final AGP_8_8 = AgpVersion.version('8.8.0')
protected static final AGP_8_9 = AgpVersion.version('8.9.0-alpha09')

protected static final AGP_LATEST = AGP_8_8
protected static final AGP_LATEST = AGP_8_9

/**
* TODO(tsr): this doc is perpetually out of date.
*
* {@code AGP_8_0} represents the minimum stable _tested_ version. {@code AGP_8_8} represents the maximum stable
* _tested_ version. DAGP may work with
* _tested_ version. We also test against the latest alpha, {@code AGP_8_9} at time of writing. DAGP may work with
* other versions of AGP, but they aren't tested, primarily for CI performance reasons.
*
* @see <a href="https://maven.google.com/web/index.html?#com.android.tools.build:gradle">AGP releases</a>
*/
protected static final SUPPORTED_AGP_VERSIONS = [
AGP_8_0,
AGP_8_8,
AGP_8_9,
]

protected static List<AgpVersion> agpVersions(AgpVersion minAgpVersion = AgpVersion.AGP_MIN) {
Expand Down

0 comments on commit 06c57cc

Please sign in to comment.