Fix project reference in task

pull/1293/head
andrew 11 months ago
parent b09b6836d4
commit 7c8882e1f3

@ -42,8 +42,9 @@ def abiPostFix = ['armeabi-v7a' : 1,
'universal' : 5]
tasks.register('checkHuaweiEnabled') {
ext.huaweiEnabled = project.hasProperty('huawei')
doFirst {
if (!project.hasProperty('huawei')) {
if (!huaweiEnabled) {
def message = 'Huawei is not enabled. Please add -Phuawei command line arg. See README.'
logger.error(message)
throw new GradleException(message)
@ -194,7 +195,7 @@ android {
applicationVariants.all { variant ->
if (variant.flavorName == 'huawei') {
variant.preBuild.dependsOn checkHuaweiEnabled
variant.getPreBuildProvider().get().dependsOn checkHuaweiEnabled
}
}
}

@ -14,7 +14,7 @@ buildscript {
classpath files('libs/gradle-witness.jar')
classpath "com.squareup:javapoet:1.13.0"
classpath "com.google.dagger:hilt-android-gradle-plugin:$daggerVersion"
if (project.hasProperty('huawei')) classpath 'com.huawei.agconnect:agcp:1.6.0.300'
if (project.hasProperty('huawei')) classpath 'com.huawei.agconnect:agcp:1.9.1.300'
}
}

Loading…
Cancel
Save