How to have android { } block outside build.gradle.kts

Viewed 55

I used to have the following structure before migrating to .kts:

app/build.gradle

...
apply from "secrets.gradle"

android {

...

}

secrets.gradle

android {
    signingConfigs {
       ...
       // extra stuff that used to get merged
    }
}

I recently converted them to .kts. I get Unresolved reference: android in secrets.gradle.kts.

Commenting out apply(from = "secrets.gradle.kts") from app/build.gradle.kts gets rid of the error, so it seems like android { } block is not allowed in secrets.gradle.kts

Is there a way to have android { } block in secrets.gradle.kts and get the previous merging behaviour?

0 Answers
Related