build.gradle 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. apply plugin: 'com.android.application'
  2. android {
  3. compileSdkVersion 28
  4. buildToolsVersion '28.0.3'
  5. externalNativeBuild {
  6. ndkBuild {
  7. path './src/main/jni/Android.mk'
  8. }
  9. }
  10. defaultConfig {
  11. applicationId "com.garagegames.torque2d"
  12. minSdkVersion 19
  13. targetSdkVersion 28
  14. sourceSets.main {
  15. assets.srcDirs = [
  16. 'src/main/assets',
  17. 'src/main/game'
  18. ]
  19. ndk {
  20. abiFilters 'x86', 'x86_64', 'armeabi-v7a' , 'arm64-v8a'
  21. }
  22. }
  23. task copyGame(type: Copy, description: 'Copy torque scripts and modules') {
  24. from('../../../../') {
  25. include '**'
  26. exclude 'engine/**'
  27. exclude 'tools/**'
  28. exclude 'tutorials/**'
  29. exclude '.**'
  30. exclude '*.dll'
  31. exclude 'preferences.cs'
  32. exclude '*.md'
  33. exclude '*.app'
  34. exclude '*.bat'
  35. exclude '*.log'
  36. exclude '*.torsion'
  37. }
  38. into 'src/main/game'
  39. includeEmptyDirs = false
  40. }
  41. task wipeGame(type: Delete, description: 'Wipe android-specific copy of torque scripts and modules') {
  42. delete 'src/main/game/'
  43. }
  44. clean.dependsOn 'wipeGame'
  45. tasks.withType(JavaCompile) {
  46. compileTask -> compileTask.dependsOn copyGame
  47. }
  48. }
  49. buildTypes {
  50. release {
  51. minifyEnabled false
  52. }
  53. }
  54. productFlavors {
  55. }
  56. }
  57. dependencies {
  58. }