Skip to content
Open
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
8 changes: 4 additions & 4 deletions app/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ android {
}

buildTypes {
val debug by getting {
getByName("debug") {
applicationIdSuffix = ".dev.app"
manifestPlaceholders["firebaseCrashlyticsCollectionEnabled"] = false
isDebuggable = true
}

val release by getting {
// signingConfig = debug.signingConfig // uncomment to run release build locally
getByName("release") {
// signingConfig = getByName("debug").signingConfig // uncomment to run release build locally
applicationIdSuffix = ".app"
manifestPlaceholders["firebaseCrashlyticsCollectionEnabled"] = true

Expand All @@ -64,7 +64,7 @@ android {
)
}

val staging by creating {
create("staging") {
applicationIdSuffix = ".app"
manifestPlaceholders["firebaseCrashlyticsCollectionEnabled"] = true
isMinifyEnabled = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ internal class ExhaustiveBackstackSerializationTest {

private fun invokeDefaultProviderMethod(interfaceClass: Class<*>, provideMethod: Method): SerializersModule {
// The providers are Kotlin interfaces whose `provide*` method is a real JVM default method
// (the project compiles with -Xjvm-default). Invoke it via an `invokespecial` MethodHandle so we
// (the project compiles with -jvm-default). Invoke it via an `invokespecial` MethodHandle so we
// don't depend on java.lang.reflect.InvocationHandler.invokeDefault, which the `:app` unit-test
// classpath resolves against Android's stubbed reflection types that lack it.
val proxy = Proxy.newProxyInstance(
Expand Down
2 changes: 1 addition & 1 deletion app/network/network-clients/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ kotlin {
implementation(projects.coreDatastorePublic)
implementation(projects.languageCore)
}
val mobileMain by getting {
getByName("mobileMain") {
dependencies {
implementation(libs.datadog.sdk.ktor)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ class ApplicationConventionPlugin : Plugin<Project> {
with(pluginManager) {
apply(libs.plugins.androidApplication.get().pluginId)
apply(libs.plugins.cacheFix.get().pluginId)
apply(libs.plugins.kotlin.get().pluginId)
}

extensions.configure<ApplicationExtension> {
Expand Down
16 changes: 14 additions & 2 deletions build-logic/convention/src/main/kotlin/HedvigGradlePlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,12 @@ private fun Project.configureMetro(libs: LibrariesForLibs) {
pluginManager.withPlugin(libs.plugins.kotlinJvm.get().pluginId) {
pluginManager.apply(metroPluginId)
}
pluginManager.withPlugin(libs.plugins.kotlin.get().pluginId) {
// Android modules get their Kotlin compilation from AGP's built-in Kotlin support, so key off the
// AGP plugins rather than a standalone Kotlin plugin.
pluginManager.withPlugin(libs.plugins.androidApplication.get().pluginId) {
pluginManager.apply(metroPluginId)
}
pluginManager.withPlugin(libs.plugins.androidLibrary.get().pluginId) {
pluginManager.apply(metroPluginId)
}

Expand Down Expand Up @@ -161,7 +166,14 @@ private fun Project.configureCommonDependencies(libs: LibrariesForLibs) {
configureCommonDependencies(project, libs)
}
}
pluginManager.withPlugin(libs.plugins.kotlin.get().pluginId) {
// Android modules use AGP's built-in Kotlin support, so key off the AGP plugins to attach the
// shared implementation dependencies (Compose BOM, logging, tracking).
pluginManager.withPlugin(libs.plugins.androidApplication.get().pluginId) {
dependencies {
configureCommonDependencies(project, libs)
}
}
pluginManager.withPlugin(libs.plugins.androidLibrary.get().pluginId) {
dependencies {
configureCommonDependencies(project, libs)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ class LibraryConventionPlugin : Plugin<Project> {
with(pluginManager) {
apply(libs.plugins.androidLibrary.get().pluginId)
apply(libs.plugins.cacheFix.get().pluginId)
apply(libs.plugins.kotlin.get().pluginId)
}

extensions.configure<LibraryExtension> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
internal fun KotlinCommonCompilerOptions.configureKotlinCompilerOptions() {
when (this) {
is KotlinJvmCompilerOptions -> {
configureCommonKotlinCompilerOptions(listOf("-Xjvm-default=all"))
configureCommonKotlinCompilerOptions(listOf("-jvm-default=no-compatibility"))
jvmTarget.set(JvmTarget.JVM_21)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import org.gradle.kotlin.dsl.create
import org.gradle.kotlin.dsl.dependencies
import org.gradle.kotlin.dsl.findByType
import org.gradle.kotlin.dsl.newInstance
import org.gradle.kotlin.dsl.project
import org.gradle.kotlin.dsl.the
import org.gradle.kotlin.dsl.withType
import org.jetbrains.compose.ComposeExtension
Expand Down Expand Up @@ -194,7 +195,7 @@ private abstract class ApolloHandler {
this.packageName.set(packageName)

@Suppress("OPT_IN_USAGE")
dependsOn(project.project(":apollo-octopus-public"), true)
dependsOn(project.dependencies.project(":apollo-octopus-public"), true)
extraConfiguration.execute(this)
}
}
Expand Down Expand Up @@ -320,15 +321,15 @@ private abstract class NavKeysHandler {
val isMultiplatform = project.extensions.findByType<KotlinMultiplatformExtension>() != null
val kspConfiguration = if (isMultiplatform) "kspAndroid" else "ksp"
project.dependencies {
add(kspConfiguration, project.project(":navigation-keys-processor"))
add(kspConfiguration, project(":navigation-keys-processor"))
}
}
}

private abstract class ViewModelsHandler {
fun configure(project: Project, pluginManager: PluginManager, libs: LibrariesForLibs) {
pluginManager.apply(libs.plugins.ksp.get().pluginId)
val processor = project.project(":viewmodel-processor")
val processor = project.dependencies.project(":viewmodel-processor")
val isMultiplatform = project.extensions.findByType<KotlinMultiplatformExtension>() != null
if (!isMultiplatform) {
project.dependencies {
Expand Down
1 change: 0 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ plugins {
alias(libs.plugins.doctor)
alias(libs.plugins.googleServices) apply false
alias(libs.plugins.kmpNativeCoroutines) apply false
alias(libs.plugins.kotlin) apply false
alias(libs.plugins.kotlinJvm) apply false
alias(libs.plugins.kotlinMultiplatform) apply false
alias(libs.plugins.kotlinter) apply false
Expand Down
5 changes: 0 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,10 @@ kotlin.internal.collectFUSMetrics=false
metro.generateContributionProviders=true
android.defaults.buildfeatures.resvalues=true
android.sdk.defaultTargetSdkToCompileSdkIfUnset=false
android.enableAppCompileTimeRClass=false
android.usesSdkInManifest.disallowed=false
android.uniquePackageNames=false
android.dependency.useConstraints=true
android.dependency.excludeLibraryComponentsFromConstraints=true
android.r8.strictFullModeForKeepRules=false
android.r8.optimizedResourceShrinking=false
android.builtInKotlin=false
android.newDsl=false

kotlin.native.cacheKind.iosSimulatorArm64=none
kotlin.native.binary.forceNativeThreadStateForFunctions=org_jetbrains_skia_DirectContext__1nFlushAndSubmit;org_jetbrains_skia_Canvas__1nDrawPicture
5 changes: 2 additions & 3 deletions micro-apps/design-showcase/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@ android {
}

buildTypes {
@Suppress("UNUSED_VARIABLE")
val debug by getting {
val debug = getByName("debug") {
isDebuggable = true
}
val release by getting {
getByName("release") {
signingConfig = debug.signingConfig
applicationIdSuffix = ".app"
isMinifyEnabled = true
Expand Down
Loading