| apply plugin: 'com.android.library' | 
|   | 
| android { | 
|   | 
|     compileSdkVersion 27 | 
|   | 
|     defaultConfig { | 
|         //applicationId "com.secondworld.univeralsdk" | 
|         minSdkVersion 18 | 
|         targetSdkVersion 27 | 
|         versionCode 1 | 
|         versionName "1.1.0" | 
|     } | 
|   | 
|     buildTypes { | 
|         release { | 
|             //混淆 | 
|             minifyEnabled true | 
|             //对齐 | 
|             zipAlignEnabled true | 
|             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | 
|   | 
|         } | 
|     } | 
|   | 
|     flavorDimensions "default" | 
|     productFlavors { | 
|         // 思璞SDK | 
|         game_xngame { | 
| //            <meta-data | 
| //            android:name="XnAppID" | 
| //            android:value="${XnAppID}" /> | 
| // | 
| //            <meta-data | 
| //            android:name="XnVersion" | 
| //            android:value="${XnVersion}" /> | 
| // | 
| //            <meta-data | 
| //            android:name="XnTrackingKey" | 
| //            android:value="${XnTrackingKey}" /> | 
|             dimension "default" | 
|             manifestPlaceholders.put("appId", "com.xiaoniu.snxx") | 
|             manifestPlaceholders.put("JpushAppKey", "22186239fee975f883198cf4") | 
|             manifestPlaceholders.put("XnAppID", "34aee53ae588421a91f7eb297689b1f0") | 
|             manifestPlaceholders.put("XnAppKey", "0ca9e17f7a6d45e58aa7d2755d0f16c2") | 
|             manifestPlaceholders.put("XnVersion", "1.3.3") | 
|             manifestPlaceholders.put("XnTrackingKey", "f93e467aa05acc0266ab844cce9321b0") | 
|         } | 
|     } | 
| } | 
| repositories { | 
|     flatDir { | 
|         dirs 'libs' | 
|     } | 
| } | 
|   | 
| dependencies { | 
|     compile(name: 'petlibrary-release', ext: 'aar') | 
|     implementation files('libs/bugly_crash_release.jar') | 
|     implementation files('libs/buglyagent.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/android-support-v4.jar') | 
| } | 
|   | 
| task autoCopy_xngame_Manifest(type: Copy) { | 
|     dependsOn 'assembleGame_xngameRelease' | 
|     from zipTree("build/outputs/aar/xn_sdk-game_xngame-release.aar") | 
|     include "AndroidManifest.xml" | 
|     into "C:\\Unity3D_SDK\\ChannelDiff\\Android\\xngame\\" | 
| } | 
|   | 
| task autoCopy_xngame(type: Copy) { | 
|     dependsOn autoCopy_xngame_Manifest | 
|     from "build/outputs/aar/" | 
|     include "xn_sdk-game_xngame-release.aar" | 
|     into "C:\\Unity3D_SDK\\ChannelDiff\\Android\\xngame\\libs\\" | 
| } |