build.gradle 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. plugins {
  2. id 'com.android.application'
  3. }
  4. def keystorePropertiesFile = rootProject.file("keystore.properties")
  5. def keystoreProperties = new Properties()
  6. keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
  7. android {
  8. compileSdkVersion COMPILE_SDK_VERSION
  9. buildToolsVersion BUILD_TOOLS_VERSION
  10. defaultConfig {
  11. applicationId "com.qsgame.demo"
  12. minSdkVersion MIN_SDK_VERSION
  13. targetSdkVersion TARGET_SDK_VERSION
  14. versionCode 1
  15. versionName "1.0"
  16. ndk {
  17. // 设置支持的SO库架构
  18. abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
  19. }
  20. }
  21. signingConfigs {
  22. config {
  23. keyAlias keystoreProperties['keyAlias']
  24. keyPassword keystoreProperties['keyPassword']
  25. storeFile file(keystoreProperties['storeFile'])
  26. storePassword keystoreProperties['storePassword']
  27. }
  28. }
  29. buildTypes {
  30. debug {
  31. minifyEnabled MINIFY_ENABLE
  32. signingConfig signingConfigs.config
  33. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  34. }
  35. release {
  36. minifyEnabled MINIFY_ENABLE
  37. signingConfig signingConfigs.config
  38. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  39. }
  40. }
  41. lintOptions {
  42. abortOnError false
  43. }
  44. repositories {
  45. flatDir {
  46. dirs 'libs'
  47. }
  48. }
  49. dexOptions {
  50. preDexLibraries = false
  51. }
  52. compileOptions {
  53. sourceCompatibility JavaVersion.VERSION_1_8
  54. targetCompatibility JavaVersion.VERSION_1_8
  55. }
  56. }
  57. dependencies {
  58. }