-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
**Background** Kotlin 2.0 is the next generation of Kotlin language development. The transition to it should be smooth, but we are using compiler plugins and there may be problems because of that More info: square/anvil#733 **Changes** - Update kotlin to 2.0 - Update anvil to 2.5.0-beta09 - Update anvil-utils - Migrate to Kotlin Compose gradle plugin **Test plan** Try to build app --------- Co-authored-by: Ilya Gulya <[email protected]> Co-authored-by: makeevrserg <[email protected]>
- Loading branch information
1 parent
d02d717
commit cfc3388
Showing
29 changed files
with
138 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 2 additions & 9 deletions
11
...main/kotlin/com/flipperdevices/buildlogic/plugin/FlipperMultiplatformDependenciesScope.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,7 @@ | ||
package com.flipperdevices.buildlogic.plugin | ||
|
||
import com.flipperdevices.buildlogic.util.ProjectExt.kotlin | ||
import org.gradle.api.Project | ||
import org.jetbrains.kotlin.gradle.plugin.KotlinDependencyHandler | ||
import org.jetbrains.kotlin.gradle.plugin.mpp.DefaultKotlinDependencyHandler | ||
|
||
open class FlipperMultiplatformDependenciesScope( | ||
project: Project, | ||
name: String | ||
) : KotlinDependencyHandler by DefaultKotlinDependencyHandler( | ||
parent = project.kotlin.sourceSets.getByName(name), | ||
project = project | ||
) | ||
handler: KotlinDependencyHandler | ||
) : KotlinDependencyHandler by handler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 1 addition & 11 deletions
12
build-logic/plugins/convention/src/main/kotlin/flipper.android-compose.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,4 @@ | ||
import com.android.build.gradle.BaseExtension | ||
|
||
plugins { | ||
id("flipper.android-lib") | ||
} | ||
|
||
@Suppress("UnstableApiUsage") | ||
configure<BaseExtension> { | ||
buildFeatures.compose = true | ||
|
||
composeOptions { | ||
kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get() | ||
} | ||
id("org.jetbrains.kotlin.plugin.compose") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
build-logic/plugins/convention/src/main/kotlin/flipper.anvil.kapt.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion | ||
import org.jetbrains.kotlin.gradle.internal.KaptGenerateStubsTask | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
|
||
plugins { | ||
id("com.squareup.anvil") | ||
} | ||
|
||
tasks.withType<KaptGenerateStubsTask>().configureEach { | ||
// TODO necessary until anvil supports something for K2 contribution merging | ||
compilerOptions { | ||
progressiveMode.set(false) | ||
languageVersion.set(KotlinVersion.KOTLIN_1_9) | ||
} | ||
} | ||
|
||
tasks.withType<KotlinCompile>().configureEach { | ||
// TODO necessary until anvil supports something for K2 contribution merging | ||
compilerOptions { | ||
progressiveMode.set(false) | ||
languageVersion.set(KotlinVersion.KOTLIN_1_9) | ||
} | ||
} | ||
|
||
dependencies { | ||
"implementation"(libs.dagger) | ||
"implementation"(libs.anvil.utils.annotations) | ||
"anvil"(libs.anvil.utils.compiler) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.