apply plugin: 'com.android.application' apply plugin: 'com.google.firebase.firebase-perf' apply plugin: 'io.fabric' buildscript { repositories { mavenLocal() maven { url 'http://nexus.javaforum.hu/nexus/content/groups/public/' } maven { url 'https://maven.google.com' } maven { url 'https://maven.fabric.io/public' } } dependencies { classpath 'com.android.tools.build:gradle:3.0.1' classpath 'com.google.firebase:firebase-plugins:1.1.5' classpath 'com.google.gms:google-services:3.2.0' classpath 'io.fabric.tools:gradle:1.25.1' } } android { buildToolsVersion '26.0.2' compileSdkVersion 25 version = '0.1.15-SNAPSHOT' defaultConfig { versionCode 11549 versionName '0.1.15-SNAPSHOT' applicationId 'info.gacivs.android' minSdkVersion 14 targetSdkVersion 25 } ext { appName = 'gacivs-android' } repositories { mavenLocal() maven { url 'http://nexus.javaforum.hu/nexus/content/groups/public/' } maven { url 'https://maven.google.com' } } configurations { natives } configurations { zip } useLibrary 'org.apache.http.legacy' dependencies { compile 'info.gacivs:gacivs-gdx-core:0.1.15-SNAPSHOT' zip 'info.gacivs:gacivs-static-war:0.1.15-SNAPSHOT@war' compile 'com.badlogicgames.gdx:gdx-backend-android:1.9.8' compile('com.crashlytics.sdk.android:crashlytics:2.9.1@aar' ){ transitive = true } compile 'com.google.android.gms:play-services-ads:11.8.0' compile 'com.google.android.gms:play-services-auth:11.8.0' compile 'com.google.android.gms:play-services-analytics:11.8.0' compile 'com.google.android.gms:play-services-gcm:11.8.0' compile 'com.google.code.gson:gson:2.8.2' compile 'com.google.firebase:firebase-ads:11.8.0' compile 'com.google.firebase:firebase-core:11.8.0' compile 'com.google.firebase:firebase-perf:11.8.0' compile 'com.koushikdutta.async:androidasync:2.2.1' compile 'hu.javaforum.android:in-app-billing-utils:1.0.7-SNAPSHOT' compile 'javax.validation:validation-api:1.1.0.Final' compile 'org.slf4j:slf4j-android:1.7.25' natives 'com.badlogicgames.gdx:gdx-platform:1.9.8:natives-armeabi' natives 'com.badlogicgames.gdx:gdx-platform:1.9.8:natives-armeabi-v7a' natives "com.badlogicgames.gdx:gdx-platform:1.9.8:natives-arm64-v8a" natives "com.badlogicgames.gdx:gdx-platform:1.9.8:natives-x86" natives "com.badlogicgames.gdx:gdx-platform:1.9.8:natives-x86_64" } sourceSets { main { manifest.srcFile 'src/main/AndroidManifest.xml' java.srcDirs = ['src/main/java'] aidl.srcDirs = ['src/main/aidl'] renderscript.srcDirs = ['src/main/render'] res.srcDirs = ['src/main/res'] assets.srcDirs = ['build/assets'] jniLibs.srcDirs = ['src/main/libs'] } instrumentTest.setRoot('tests') } flavorDimensions 'tier' productFlavors { dev { resValue "string", "app_name", "GaCivs-T" applicationIdSuffix ".test" targetSdkVersion 20 dimension 'tier' } prod { resValue "string", "app_name", "GaCivs" applicationIdSuffix "" dimension 'tier' } } packagingOptions { exclude 'META-INF/robovm/ios/robovm.xml' exclude 'META-INF/LICENSE' } signingConfigs { debug { storeFile file("src/main/keystore/gacivs.keystore") storePassword project.property('gacivsStorePassword') keyAlias "default" keyPassword project.property('gacivsKeyPassword') } release { storeFile file("src/main/keystore/gacivs.keystore") storePassword project.property('gacivsStorePassword') keyAlias "default" keyPassword project.property('gacivsKeyPassword') } } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' signingConfig signingConfigs.release } } } task extractAssets(type: Sync) { dependsOn configurations.zip from { configurations.zip.collect { zipTree(it) } } into 'build/assets/' include 'gdx/**' include 'sounds/**' include 'themes/**' } preBuild.dependsOn extractAssets task copyAndroidNatives() { file("src/main/libs/armeabi/").mkdirs(); file("src/main/libs/armeabi-v7a/").mkdirs(); file("src/main/libs/arm64-v8a/").mkdirs(); file("src/main/libs/x86_64/").mkdirs(); file("src/main/libs/x86/").mkdirs(); configurations.natives.files.each { jar -> def outputDir = null if(jar.name.endsWith("natives-arm64-v8a.jar")) outputDir = file("src/main/libs/arm64-v8a") if(jar.name.endsWith("natives-armeabi-v7a.jar")) outputDir = file("src/main/libs/armeabi-v7a") if(jar.name.endsWith("natives-armeabi.jar")) outputDir = file("src/main/libs/armeabi") if(jar.name.endsWith("natives-x86_64.jar")) outputDir = file("src/main/libs/x86_64") if(jar.name.endsWith("natives-x86.jar")) outputDir = file("src/main/libs/x86") if(outputDir != null) { copy { from zipTree(jar) into outputDir include "*.so" } } } } tasks.withType(JavaCompile) { options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" } apply plugin: 'com.google.gms.google-services'