proj.android/build.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:0.12.2' | |
} | |
} | |
apply plugin: 'android' | |
repositories { | |
mavenCentral() | |
} | |
// repositories { | |
// flatDir { | |
// dirs '/PATH/TO/LOCAL/UpdateChecker/library/build/outputs/aar/' | |
// } | |
// } | |
dependencies { | |
// compile(name: 'library-debug', ext: 'aar') | |
compile 'com.github.rampo.updatechecker:library:2.1.4' | |
compile fileTree(dir: 'libs', include: '*.jar') | |
compile fileTree(dir: '/libs/armeabi', include: '*/so') | |
compile project(':..:cocos2d:cocos:platform:android:java') | |
compile project(':..:cocos2d:plugin:protocols:proj.android') | |
compile 'com.google.android.gms:play-services:6.5.87' | |
} | |
android { | |
compileSdkVersion 21 | |
buildToolsVersion "21.1.2" | |
sourceSets { | |
main { | |
manifest.srcFile 'AndroidManifest.xml' | |
java.srcDirs = ['src'] | |
resources.srcDirs = ['src'] | |
aidl.srcDirs = ['src'] | |
renderscript.srcDirs = ['src'] | |
res.srcDirs = ['res'] | |
assets.srcDirs = ['assets'] | |
} | |
androidTest.setRoot('tests') | |
} | |
buildTypes { | |
release { | |
project.group = 'release' | |
debuggable false | |
runProguard false | |
proguardFile getDefaultProguardFile('proguard-android.txt') | |
} | |
debug { | |
project.group = 'debug' | |
debuggable true | |
} | |
} | |
task ndkBuild(type:Exec) { | |
cpu_num = Runtime.getRuntime().availableProcessors() | |
println "cpu_num=${cpu_num}" | |
if(project.group == "debug"){ | |
println "DEBUG MODE" | |
commandLine 'ndk-build', "-j${cpu_num}", "NDK_DEBUG=1" | |
}else{ | |
commandLine 'ndk-build', "-j${cpu_num}" | |
} | |
} | |
tasks.withType(Compile) { | |
compileTask -> compileTask.dependsOn ndkBuild | |
} | |
task ndkClean(type:Exec) { | |
commandLine 'ndk-build', 'clean' | |
} | |
clean.dependsOn 'ndkClean' | |
} | |
tasks.withType(Compile) { | |
options.encoding = 'UTF-8' | |
} | |
tasks.withType(com.android.build.gradle.tasks.PackageApplication) { pkgTask -> | |
pkgTask.jniFolders = new HashSet<File>() | |
pkgTask.jniFolders.add(new File(projectDir, 'libs')) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment