MacBuilder
2018-08-28 6f5a7b2cf52e2816d664ddaa14dc76b5c2d5d0a3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
apply plugin: 'com.android.library'
 
android {
 
    compileSdkVersion 22
 
    defaultConfig {
        //applicationId "com.secondworld.univeralsdk"
        minSdkVersion 16
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }
 
    buildTypes {
        release {
            //混淆
            minifyEnabled true
            //对齐
            zipAlignEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
 
    flavorDimensions "default"
    productFlavors {
        // 少年修仙传
        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_")
        }
        // 少年修仙传
        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")
            manifestPlaceholders.put("TT_AppName", "少年修仙传")
            manifestPlaceholders.put("TT_AppID", "151709")
            manifestPlaceholders.put("TT_Chanel", "android-snxxz")
        }
        // 灵仙记
        game_813015059 {
            dimension "default"
            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")
            manifestPlaceholders.put("TT_AppName", "少年修仙传")
            manifestPlaceholders.put("TT_AppID", "151709")
            manifestPlaceholders.put("TT_Chanel", "android-snxxz")
        }
        // 上古搜宝录
        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")
            manifestPlaceholders.put("TT_AppName", "少年修仙传")
            manifestPlaceholders.put("TT_AppID", "151709")
            manifestPlaceholders.put("TT_Chanel", "android-snxxz")
        }
        // 测试专用(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")
            manifestPlaceholders.put("TT_AppName", "少年修仙传")
            manifestPlaceholders.put("TT_AppID", "151709")
            manifestPlaceholders.put("TT_Chanel", "android-snxxz")
        }
    }
}
 
repositories {
    flatDir {
        dirs 'libs'
    }
}
 
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')
    compile(name: 'applog-release', ext: 'aar')
    provided files('libs/unity-classes.jar')
}
 
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\\ChannelDiff\\815035853\\"
}
 
task autoCopy_815035853(type: Copy, dependsOn: 'autoCopy_815035853_Manifest') {
    from "build/outputs/aar/"
    include "app-game_815035853-release.aar"
    into "C:\\Unity3D_SDK\\ChannelDiff\\815035853\\libs\\"
}
 
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\\ChannelDiff\\226114725\\"
}
 
task autoCopy_226114725(type: Copy) {
    dependsOn autoCopy_226114725_Manifest
    from "build/outputs/aar/"
    include "app-game_226114725-release.aar"
    into "C:\\Unity3D_SDK\\ChannelDiff\\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\\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\\822055139\\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\\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\\813015059\\libs\\"
}
 
task autoCopySecondWorldAndroidManifest(type: Copy) {
    dependsOn 'assembleSecondworldRelease'
    from zipTree("build/outputs/aar/app-secondworld-release.aar")
    include "AndroidManifest.xml"
    into "C:\\Unity3D_SDK\\ChannelDiff\\test\\"
}
 
task autoCopySecondWorldAAR(type: Copy) {
    dependsOn autoCopySecondWorldAndroidManifest
    from 'build/outputs/aar/'
    include "app-secondworld-release.aar"
    into 'C:\\Unity3D_SDK\\ChannelDiff\\test\\libs\\'
 
}