build.gradle 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. apply plugin: 'com.android.library'
  2. android {
  3. compileSdkVersion 32
  4. defaultConfig {
  5. minSdkVersion 14
  6. targetSdkVersion 32
  7. versionCode 1
  8. versionName "1.0"
  9. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  10. }
  11. buildTypes {
  12. release {
  13. minifyEnabled false
  14. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  15. }
  16. }
  17. packagingOptions {
  18. // 剔除这个包下的所有文件(不会移除签名信息)
  19. exclude 'META-INF/*******'
  20. }
  21. }
  22. dependencies {
  23. implementation fileTree(dir: 'libs', include: ['*.jar'])
  24. implementation 'androidx.appcompat:appcompat:1.4.1'
  25. testImplementation 'junit:junit:4.13.2'
  26. androidTestImplementation 'androidx.test.ext:junit:1.1.3'
  27. androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
  28. implementation "androidx.core:core-ktx:1.7.0"
  29. }
  30. afterEvaluate {
  31. // 排除 BuildConfig.class 和 R.class
  32. generateReleaseBuildConfig.enabled = false
  33. generateDebugBuildConfig.enabled = false
  34. generateReleaseResValues.enabled = false
  35. generateDebugResValues.enabled = false
  36. }
  37. apply from: 'bintrayUpload.gradle'
  38. repositories {
  39. mavenCentral()
  40. }