plugins { id 'com.android.library' } android { compileSdk 31 defaultConfig { minSdk 21 targetSdk 26 consumerProguardFiles "consumer-rules.pro" } buildTypes { release { minifyEnabled rootProject.ext.module.minifyEnabled proguardFiles 'proguard-rules.pro' } debug { minifyEnabled rootProject.ext.module.minifyEnabled proguardFiles 'proguard-rules.pro' } } buildFeatures { buildConfig false } compileOptions { sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7 } } /** task modify_properties() { android.libraryVariants.all { variant -> String YYXX_ONLINE_ENV = '' if (variant.buildType.name == 'release'){ YYXX_ONLINE_ENV = "YYXX_ONLINE_ENV=https://sdkapi.yyxxgame.com" }else if(variant.buildType.name == 'debug'){ YYXX_ONLINE_ENV = "YYXX_ONLINE_ENV=http://testsdkapi.yyxxgame.com" }else{ YYXX_ONLINE_ENV = "YYXX_ONLINE_ENV=https://sdkapi.yyxxgame.com" } def list = [] def path = "${getRootDir()}/library_platform/hnyy/src/main/assets/yyxx_game/yyxx_cfg.properties" new File(path).withReader('UTF-8') { reader -> reader.eachLine { if (it.contains('YYXX_ONLINE_ENV')){ it = YYXX_ONLINE_ENV } list.add(it + "\n") } } new File(path).withWriter('UTF-8') { writer -> list.each { writer.write(it) } } } } **/ android.libraryVariants.all { variant -> if (variant.buildType.name == 'release'){ variant.outputs.all { outputFileName = "$PUBLISH_ARTIFACT_ID$PUBLISH_VERSION" + ".aar" } }else{ variant.outputs.all { outputFileName = "$PUBLISH_ARTIFACT_ID" + "_"+ variant.buildType.name + "$PUBLISH_VERSION" + ".aar" } } } ext { PUBLISH_ARTIFACT_ID = 'yyxx_comm_platform_hnyy' PUBLISH_VERSION = ':3.0.100' } dependencies { compileOnly project(':library_base') compileOnly project(':library_core') compileOnly project(':library_channel') compileOnly files('../hnyy/libs/oaid_sdk_1.0.25.aar') } apply from: 'buildJar.gradle'