Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion baselineprofile/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ android {
* While on Github Actions, another parameter is required:
* -Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
*/
testOptions.managedDevices.devices {
testOptions.managedDevices.allDevices {
create<ManagedVirtualDevice>("pixel6Api34") {
device = "Pixel 6"
apiLevel = 34
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class AndroidApplicationConventionPlugin : Plugin<Project> {
with(target) {
with(pluginManager) {
apply(libs.plugins.android.application)
apply(libs.plugins.jetbrains.kotlin.android)
}

extensions.configure<ApplicationExtension> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import com.android.build.gradle.LibraryExtension
import com.javernaut.whatthecodec.buildlogic.Versions
import com.android.build.api.dsl.LibraryExtension
import com.javernaut.whatthecodec.buildlogic.configureKotlinAndroid
import com.javernaut.whatthecodec.buildlogic.extension.apply
import com.javernaut.whatthecodec.buildlogic.extension.libs
Expand All @@ -12,12 +11,10 @@ class AndroidLibraryConventionPlugin : Plugin<Project> {
with(target) {
with(pluginManager) {
apply(libs.plugins.android.library)
apply(libs.plugins.jetbrains.kotlin.android)
}

extensions.configure<LibraryExtension> {
configureKotlinAndroid(this)
defaultConfig.targetSdk = Versions.targetSdk
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import com.android.build.gradle.TestExtension
import com.android.build.api.dsl.TestExtension
import com.javernaut.whatthecodec.buildlogic.Versions
import com.javernaut.whatthecodec.buildlogic.configureKotlinAndroid
import com.javernaut.whatthecodec.buildlogic.extension.apply
Expand All @@ -12,7 +12,6 @@ class AndroidTestConventionPlugin : Plugin<Project> {
with(target) {
with(pluginManager) {
apply(libs.plugins.android.test)
apply(libs.plugins.jetbrains.kotlin.android)
}

extensions.configure<TestExtension> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,16 @@ import com.javernaut.whatthecodec.buildlogic.extension.debugImplementation
import com.javernaut.whatthecodec.buildlogic.extension.implementation
import com.javernaut.whatthecodec.buildlogic.extension.libs
import org.gradle.api.Project
import org.gradle.kotlin.dsl.assign
import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.dependencies
import org.jetbrains.kotlin.compose.compiler.gradle.ComposeCompilerGradlePluginExtension

/**
* Configure Compose-specific options
*/
internal fun Project.configureAndroidCompose(
commonExtension: CommonExtension<*, *, *, *, *, *>,
commonExtension: CommonExtension,
) {
commonExtension.apply {
buildFeatures {
buildFeatures.apply {
compose = true
}

Expand All @@ -32,8 +29,4 @@ internal fun Project.configureAndroidCompose(
androidTestImplementation(libs.androidx.ui.test.junit4)
}
}

extensions.configure<ComposeCompilerGradlePluginExtension> {
enableStrongSkippingMode = true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,27 @@ import org.gradle.kotlin.dsl.assign
import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.provideDelegate
import org.jetbrains.kotlin.gradle.dsl.KotlinAndroidProjectExtension
import org.jetbrains.kotlin.gradle.dsl.KotlinBaseExtension
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension
import org.jetbrains.kotlin.gradle.dsl.KotlinTopLevelExtension

/**
* Configure base Kotlin with Android options
*/
internal fun Project.configureKotlinAndroid(
commonExtension: CommonExtension<*, *, *, *, *, *>,
commonExtension: CommonExtension,
) {
commonExtension.apply {
compileSdk = Versions.compileSdk

defaultConfig {
defaultConfig.apply {
minSdk = Versions.minSdk
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

compileOptions {
compileOptions.apply {
sourceCompatibility = Versions.javaSourceCompatibility
targetCompatibility = Versions.javaTargetCompatibility
}
@Suppress("UnstableApiUsage")
testOptions.animationsDisabled = true
}

Expand All @@ -50,7 +49,7 @@ internal fun Project.configureKotlinJvm() {
/**
* Configure base Kotlin options
*/
private inline fun <reified T : KotlinTopLevelExtension> Project.configureKotlin() = configure<T> {
private inline fun <reified T : KotlinBaseExtension> Project.configureKotlin() = configure<T> {
// Treat all Kotlin warnings as errors (disabled by default)
// Override by setting warningsAsErrors=true in your ~/.gradle/gradle.properties
val warningsAsErrors: String? by project
Expand Down
1 change: 0 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ apply(from = "${rootDir}/scripts/read-arguments.gradle")
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.jetbrains.kotlin.jvm) apply false
alias(libs.plugins.jetbrains.kotlin.android) apply false
alias(libs.plugins.jetbrains.kotlin.compose) apply false
alias(libs.plugins.detekt) apply false
alias(libs.plugins.google.ksp) apply false
Expand Down
7 changes: 3 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[versions]
androidGradlePlugin = "8.13.2"
androidGradlePlugin = "9.0.0"
androidTools = "32.0.0"

kotlin = "2.3.0"
Expand All @@ -13,7 +13,7 @@ androidx-activity-compose = "1.12.3"
androidx-compose-bom = "2026.01.01"
androidx-hilt = "1.3.0"

androidx-benchmark = "1.4.1"
androidx-benchmark = "1.5.0-alpha02"
androidx-profileinstaller = "1.4.1"

androidx-test-core = "1.7.0"
Expand All @@ -25,7 +25,7 @@ androidx-test-ext-truth = "1.7.0"
screengrab = "2.1.1"

google-ksp = "2.3.5"
google-dagger = "2.58"
google-dagger = "2.59"

detekt = "1.23.8"

Expand Down Expand Up @@ -113,7 +113,6 @@ android-library = { id = "com.android.library", version.ref = "androidGradlePlug
android-test = { id = "com.android.test", version.ref = "androidGradlePlugin" }
androidx-baselineprofile = { id = "androidx.baselineprofile", version.ref = "androidx-benchmark" }
jetbrains-kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
jetbrains-kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
google-ksp = { id = "com.google.devtools.ksp", version.ref = "google-ksp" }
google-hilt = { id = "com.google.dagger.hilt.android", version.ref = "google-dagger" }
Expand Down
Loading