hch
2022-04-08 2cb09a2f9e511412b764fda037293dd16d65f46b
Project/app/build.gradle
@@ -2,14 +2,14 @@
android {
    compileSdkVersion 22
    compileSdkVersion 26
    defaultConfig {
        //applicationId "com.secondworld.univeralsdk"
        minSdkVersion 16
        targetSdkVersion 22
        minSdkVersion 18
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        versionName "1.1.0"
    }
    buildTypes {
@@ -19,28 +19,81 @@
            //对齐
            zipAlignEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    flavorDimensions "default"
    productFlavors {
        snxxz {
        // TAPTAP
        game_904100357 {
            dimension "default"
            manifestPlaceholders.put("appId", "com.ziyouyouxi08.djxxz")
            manifestPlaceholders.put("FreeSDK_AppID", "904100357")
            manifestPlaceholders.put("FreeSDK_ChanelID", "1000")
            manifestPlaceholders.put("FreeSDK_PlatformID", "1000")
            manifestPlaceholders.put("JpushAppKey", "bc1907c74128fdbd85018a83")
        }
        // 少年修仙传 - 新
        game_822055139 {
            dimension "default"
            manifestPlaceholders.put("appId", "com.ziyouyouxi01.snxxz")
            manifestPlaceholders.put("FreeSDK_AppID", "822055139")
            manifestPlaceholders.put("FreeSDK_ChanelID", "1000")
            manifestPlaceholders.put("FreeSDK_PlatformID", "1000")
            manifestPlaceholders.put("TrackAppID", "a0304df6f4dfdd5bd7cbf6369f7f1c11")
            manifestPlaceholders.put("TrackChannelID", "_default_")
            manifestPlaceholders.put("JpushAppKey", "1c060648058afe0b5faf72ca")
            manifestPlaceholders.put("TT_AppName", "少年修仙传")
            manifestPlaceholders.put("TT_AppID", "151709")
            manifestPlaceholders.put("TT_Chanel", "_default_")
            dependencies {
                implementation(name: 'applog-release', ext: 'aar')
            }
        }
        // 少年修仙传
        game_226114725 {
            dimension "default"
            manifestPlaceholders.put("appId", "com.shandangceshi.snxxz")
            manifestPlaceholders.put("FreeSDK_AppID", "226114725")
            manifestPlaceholders.put("FreeSDK_ChanelID", "1000")
            manifestPlaceholders.put("FreeSDK_PlatformID", "1000")
            manifestPlaceholders.put("TrackAppID", "5ae23b6b905f98d9b8bd542debf35678")
            manifestPlaceholders.put("TrackChannelID", "_default_")
            manifestPlaceholders.put("JpushAppKey", "22186239fee975f883198cf4")
        }
        djx {
        // 灵仙记
        game_813015059 {
            dimension "default"
            manifestPlaceholders.put("appId", "com.shandangceshi.snxxz")
            manifestPlaceholders.put("TrackAppID", "fa550076116709861b7e9b61bb401710")
            manifestPlaceholders.put("appId", "com.ziyouyouxi07.snxxz")
            manifestPlaceholders.put("FreeSDK_AppID", "813015059")
            manifestPlaceholders.put("FreeSDK_ChanelID", "1000")
            manifestPlaceholders.put("FreeSDK_PlatformID", "1000")
            manifestPlaceholders.put("TrackAppID", "0c5ad863fb8935d18b3ecefe05389701")
            manifestPlaceholders.put("TrackChannelID", "_default_")
            manifestPlaceholders.put("JpushAppKey", "63f9523bf41727aaccfd258f")
        }
        // 上古搜宝录
        game_815035853 {
            dimension "default"
            manifestPlaceholders.put("appId", "com.ziyouyouxi05.snxxz")
            manifestPlaceholders.put("FreeSDK_AppID", "815035853")
            manifestPlaceholders.put("FreeSDK_ChanelID", "1000")
            manifestPlaceholders.put("FreeSDK_PlatformID", "1000")
            manifestPlaceholders.put("TrackAppID", "9e16495be922a78c4dbef24d8adc9c36")
            manifestPlaceholders.put("TrackChannelID", "_default_")
            manifestPlaceholders.put("JpushAppKey", "44329480f1b4ac22d737c559")
        }
        // 测试专用(test)
        secondworld {
            dimension "default"
            manifestPlaceholders.put("appId", "com.secondworld.snxxz")
            manifestPlaceholders.put("FreeSDK_AppID", "226114725")
            manifestPlaceholders.put("FreeSDK_ChanelID", "1000")
            manifestPlaceholders.put("FreeSDK_PlatformID", "1000")
            manifestPlaceholders.put("TrackAppID", "5ae23b6b905f98d9b8bd542debf35678")
            manifestPlaceholders.put("TrackChannelID", "_default_")
            manifestPlaceholders.put("JpushAppKey", "22186239fee975f883198cf4")
        }
    }
}
@@ -53,55 +106,95 @@
dependencies {
    implementation files('libs/android-support-v4.jar')
    implementation files('libs/bugly_crash_release.jar')
    implementation files('libs/gson.jar')
    implementation files('libs/jcore-android-1.2.1.jar')
    implementation files('libs/jpush-android-3.1.3.jar')
    implementation files('libs/okhttp.jar')
    implementation files('libs/okio.jar')
    implementation files('libs/tracking1.3.0.jar')
    compile(name: 'freesdk-release', ext: 'aar')
    provided files('libs/unity-classes.jar')
    implementation files('libs/jcore-android-1.2.1.jar')
    implementation files('libs/jpush-android-3.1.3.jar')
    compileOnly files('libs/unity-classes.jar')
    implementation files('libs/bugly.jar')
    implementation files('libs/buglyagent.jar')
    implementation(name: 'freesdk-release', ext: 'aar')
}
task autoCopyDjxAndroidManifest(type: Copy) {
    dependsOn 'assembleDjxRelease'
    from zipTree("build/outputs/aar/app-djx-release.aar")
task autoCopy_815035853_Manifest(type: Copy) {
    dependsOn 'assembleGame_815035853Release'
    from zipTree("build/outputs/aar/app-game_815035853-release.aar")
    include "AndroidManifest.xml"
    into "C:\\Unity3D_SDK\\渠道差异\\斗剑仙\\"
    into "C:\\Unity3D_SDK\\ChannelDiff\\Android\\815035853\\"
}
task autoCopyDjxAAR(type: Copy) {
    dependsOn autoCopyDjxAndroidManifest
task autoCopy_815035853(type: Copy) {
    dependsOn autoCopy_815035853_Manifest
    from "build/outputs/aar/"
    include "app-djx-release.aar"
    into "C:\\Unity3D_SDK\\渠道差异\\斗剑仙\\libs\\"
    include "app-game_815035853-release.aar"
    into "C:\\Unity3D_SDK\\ChannelDiff\\Android\\815035853\\libs\\"
}
task autoCopySnxxzAndroidManifest(type: Copy) {
    dependsOn 'assembleSnxxzRelease'
    from zipTree("build/outputs/aar/app-snxxz-release.aar")
task autoCopy_226114725_Manifest(type: Copy) {
    dependsOn 'assembleGame_226114725Release'
    from zipTree("build/outputs/aar/app-game_226114725-release.aar")
    include "AndroidManifest.xml"
    into "C:\\Unity3D_SDK\\渠道差异\\少年修仙传\\"
    into "C:\\Unity3D_SDK\\ChannelDiff\\Android\\226114725\\"
}
task autoCopySnxxzAAR(type: Copy) {
    dependsOn autoCopySnxxzAndroidManifest
task autoCopy_226114725(type: Copy) {
    dependsOn autoCopy_226114725_Manifest
    from "build/outputs/aar/"
    include "app-snxxz-release.aar"
    into "C:\\Unity3D_SDK\\渠道差异\\少年修仙传\\libs\\"
    include "app-game_226114725-release.aar"
    into "C:\\Unity3D_SDK\\ChannelDiff\\Android\\226114725\\libs\\"
}
task autoCopy_822055139_Manifest(type: Copy) {
    dependsOn 'assembleGame_822055139Release'
    from zipTree("build/outputs/aar/app-game_822055139-release.aar")
    include "AndroidManifest.xml"
    into "C:\\Unity3D_SDK\\ChannelDiff\\Android\\822055139\\"
}
task autoCopy_822055139(type: Copy, dependsOn: autoCopy_822055139_Manifest) {
    from "build/outputs/aar/"
    include "app-game_822055139-release.aar"
    into "C:\\Unity3D_SDK\\ChannelDiff\\Android\\822055139\\libs\\"
}
task autoCopy_904100357_Manifest(type: Copy) {
    dependsOn 'assembleGame_904100357Release'
    from zipTree("build/outputs/aar/app-game_904100357-release.aar")
    include "AndroidManifest.xml"
    into "C:\\Unity3D_SDK\\ChannelDiff\\Android\\904100357\\"
}
task autoCopy_904100357(type: Copy, dependsOn: autoCopy_904100357_Manifest) {
    from "build/outputs/aar/"
    include "app-game_904100357-release.aar"
    into "C:\\Unity3D_SDK\\ChannelDiff\\Android\\904100357\\libs\\"
}
task autoCopy_813015059_Manifest(type: Copy) {
    dependsOn 'assembleGame_813015059Release'
    from zipTree("build/outputs/aar/app-game_813015059-release.aar")
    include "AndroidManifest.xml"
    into "C:\\Unity3D_SDK\\ChannelDiff\\Android\\813015059\\"
}
task autoCopy_813015059(type: Copy, dependsOn: autoCopy_813015059_Manifest) {
    from "build/outputs/aar/"
    include "app-game_813015059-release.aar"
    into "C:\\Unity3D_SDK\\ChannelDiff\\Android\\813015059\\libs\\"
}
task autoCopySecondWorldAndroidManifest(type: Copy) {
    dependsOn 'assembleSecondworldRelease'
    from zipTree("build/outputs/aar/app-secondworld-release.aar")
    include "AndroidManifest.xml"
    into "C:\\Unity3D_SDK\\Android\\test"
    into "C:\\Unity3D_SDK\\ChannelDiff\\Android\\test\\"
}
task autoCopySecondWorldAAR(type: Copy) {
    dependsOn autoCopySecondWorldAndroidManifest
    from "build/outputs/aar/"
    from 'build/outputs/aar/'
    include "app-secondworld-release.aar"
    into "C:\\Unity3D_SDK\\Android\\test\\libs\\"
    into 'C:\\Unity3D_SDK\\ChannelDiff\\Android\\test\\libs\\'
}