123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- 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'
|