Good afternoon. Please help me find a solution. I ...
# github-workflows-kt
s
Good afternoon. Please help me find a solution. I have an android project and I want to move a section from the module level gradle to the project level. I am using Kotlin DSL. I found a solution for Groovy but I can't migrate it to Kotlin.
Copy code
def applyAndroid(project) {
    project.android {

        compileSdkVersion compileVersion

        defaultConfig {
            minSdkVersion minVersion
            targetSdkVersion compileVersion
            versionCode verCode
            versionName verName
            testInstrumentationRunner testRunner
        }

        compileOptions {
            sourceCompatibility = 1.8
            targetCompatibility = 1.8
        }

        kotlinOptions {
            jvmTarget = "1.8"
//            useIR = true
            freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
            freeCompilerArgs += "-Xjvm-default=all"
        }

        testOptions.unitTests {
            includeAndroidResources = true
        }

        buildFeatures {
            aidl = false
            renderScript = false
            resValues = false
            shaders = false
        }
    }

}
p
wrong channel, try #gradle 😄
⬆️ 2
s
or maybe #android?
👍 1
s
Thank U