| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- apply plugin: 'com.android.application'
- /*import org.apache.tools.ant.taskdefs.condition.Os*/
- android {
- compileSdkVersion 23
- buildToolsVersion "23.0.3"
- externalNativeBuild{
- ndkBuild{
- path './src/main/jni/Android.mk'
- }
- }
- defaultConfig {
- applicationId "com.garagegames.torque2d"
- minSdkVersion 16
- targetSdkVersion 23
- sourceSets.main {
- assets.srcDirs=[
- 'src/main/assets',
- 'src/main/game'
- ]
- // jni.srcDirs = ['../../../source/']
- // jniLibs.srcDir 'src/main/libs'
- }
- /* task buildNative(type: Exec, description: 'Compile JNI source via NDK') {
- def ndkDir = plugins.getPlugin('com.android.application').sdkHandler.getNdkFolder()
- def extension = (Os.isFamily(Os.FAMILY_WINDOWS))? '.cmd' : ''
- commandLine "$ndkDir/ndk-build" + extension,
- '-C', file('src/main/jni').absolutePath,
- '-j', Runtime.runtime.availableProcessors(),
- 'all',
- 'NDK_DEBUG=1'
- }*/
- /* task cleanNative(type: Exec, description: 'Clean JNI object files') {
- def ndkDir = plugins.getPlugin('com.android.application').sdkHandler.getNdkFolder()
- def extension = (Os.isFamily(Os.FAMILY_WINDOWS))? '.cmd' : ''
- commandLine "$ndkDir/ndk-build" + extension,
- '-C', file('src/main/jni').absolutePath,
- 'clean'
- }*/
- task copyGame(type: Copy, description: 'Copy torque scripts and modules'){
- from('../../../../'){
- include '**'
- exclude 'engine/**'
- exclude 'tools/**'
- exclude 'tutorials/**'
- exclude '.**'
- exclude '*.dll'
- exclude 'preferences.cs'
- exclude '*.md'
- exclude '*.app'
- exclude '*.bat'
- exclude '*.log'
- exclude '*.torsion'
- }
- into 'src/main/game'
- includeEmptyDirs = false
- }
- task wipeGame(type: Delete, description: 'Wipe android-specific copy of torque scripts and modules'){
- delete 'src/main/game/'
- }
- /*clean.dependsOn 'cleanNative'*/
- clean.dependsOn 'wipeGame'
- tasks.withType(JavaCompile) {
- compileTask -> compileTask.dependsOn copyGame
- }
- /*tasks.withType(JavaCompile) {
- compileTask -> compileTask.dependsOn buildNative
- }*/
- /*tasks.withType(com.android.build.gradle.tasks.NdkCompile){task->
- task.enabled = false
- }*/
- }
- buildTypes {
- release {
- minifyEnabled false
- }
- }
- }
|