Adding release keys in the experimental Gradle plugin for Android

前端 未结 3 1105
天命终不由人
天命终不由人 2021-01-19 21:40

Hey I am having some issues adding a signing my release build variant. Currently I am using the experimental gradle 2.5 with the new android gradle plugin version 0.1.0.

3条回答
  •  悲&欢浪女
    2021-01-19 22:21

    This workaround works for me and does not require -Dorg.gradle.model.dsl=true

    model {
        def signConf
    
        android.buildTypes {
            release {
                signingConfig = signConf
            }
        }
    
        android.signingConfigs {
            create("signed") {
                keyAlias = "meow"
                keyPassword = "**"
                storeFile = file("meow-key.keystore")
                storePassword = "**"
                storeType = "jks"
    
                signConf = it
            }
        }
    }
    

    However, it only works if you only have one signingConfig.

提交回复
热议问题