build.gradle 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. import com.android.builder.core.BuilderConstants
  2. import java.util.regex.Pattern
  3. buildscript {
  4. repositories {
  5. jcenter()
  6. }
  7. dependencies {
  8. classpath 'com.android.tools.build:gradle:2.1.2'
  9. }
  10. }
  11. apply plugin: 'com.android.library'
  12. repositories {
  13. mavenCentral()
  14. }
  15. allprojects {
  16. gradle.projectsEvaluated {
  17. tasks.withType(JavaCompile) {
  18. options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
  19. }
  20. }
  21. }
  22. def getVersionName = { ->
  23. def stdout = new ByteArrayOutputStream()
  24. exec {
  25. commandLine 'git', 'describe', '--tags', '--always'
  26. standardOutput = stdout
  27. }
  28. return stdout.toString().trim()
  29. }
  30. android {
  31. // IMPORTANT: Changing versions? Update `setup` as well!
  32. compileSdkVersion 23
  33. buildToolsVersion "23.0.2"
  34. defaultPublishConfig ""
  35. publishNonDefault true
  36. defaultConfig {
  37. minSdkVersion 14
  38. targetSdkVersion 23
  39. versionCode 2
  40. versionName getVersionName()
  41. consumerProguardFiles 'proguard.txt'
  42. archivesBaseName = 'atomicjavasdl'
  43. }
  44. productFlavors {
  45. }
  46. }
  47. dependencies {
  48. }