Skip to content

Commit

Permalink
Clean up Gradle build
Browse files Browse the repository at this point in the history
  • Loading branch information
janseeger committed Dec 6, 2024
1 parent 1bdd3f9 commit 09fc3cc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import org.gradle.api.Project
import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.withType
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

class AndroidLibraryBasePlugin: Plugin<Project> {
class AndroidLibraryBasePlugin : Plugin<Project> {
override fun apply(target: Project) {
with(target) {
with(pluginManager) {
Expand Down Expand Up @@ -43,10 +44,11 @@ private fun Project.setJdkVersion(version: JavaVersion) {

private fun Project.enableContextReceivers() {
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
languageVersion = "2.0"
freeCompilerArgs = freeCompilerArgs + listOf(
compilerOptions {
languageVersion.set(KotlinVersion.KOTLIN_2_1)
freeCompilerArgs.addAll(listOf(
"-Xcontext-receivers"
)
)
}
}
Expand Down
2 changes: 0 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
@Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed
plugins {
alias(libs.plugins.android.library) apply false
alias(libs.plugins.kotlin.android) apply false
Expand Down

0 comments on commit 09fc3cc

Please sign in to comment.