🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.6 KiB

  1. def buildAsLibrary = project.hasProperty('BUILD_AS_LIBRARY');
  2. def buildAsApplication = !buildAsLibrary
  3. if (buildAsApplication) {
  4. apply plugin: 'com.android.application'
  5. }
  6. else {
  7. apply plugin: 'com.android.library'
  8. }
  9. android {
  10. compileSdkVersion 26
  11. defaultConfig {
  12. if (buildAsApplication) {
  13. applicationId "org.libsdl.app"
  14. }
  15. minSdkVersion 16
  16. targetSdkVersion 26
  17. versionCode 1
  18. versionName "1.0"
  19. externalNativeBuild {
  20. ndkBuild {
  21. arguments "APP_PLATFORM=android-16"
  22. abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
  23. }
  24. }
  25. }
  26. buildTypes {
  27. release {
  28. minifyEnabled false
  29. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  30. }
  31. }
  32. if (!project.hasProperty('EXCLUDE_NATIVE_LIBS')) {
  33. sourceSets.main {
  34. jniLibs.srcDir 'libs'
  35. }
  36. externalNativeBuild {
  37. ndkBuild {
  38. path 'jni/Android.mk'
  39. }
  40. }
  41. }
  42. lintOptions {
  43. abortOnError false
  44. }
  45. if (buildAsLibrary) {
  46. libraryVariants.all { variant ->
  47. variant.outputs.each { output ->
  48. def outputFile = output.outputFile
  49. if (outputFile != null && outputFile.name.endsWith(".aar")) {
  50. def fileName = "org.libsdl.app.aar";
  51. output.outputFile = new File(outputFile.parent, fileName);
  52. }
  53. }
  54. }
  55. }
  56. }
  57. dependencies {
  58. implementation fileTree(include: ['*.jar'], dir: 'libs')
  59. }