build.gradle 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. // xxx ignore not resolved classes; gradle can manage. fixes reproducible builds
  2. import com.android.tools.profgen.ArtProfileKt
  3. import com.android.tools.profgen.ArtProfileSerializer
  4. import com.android.tools.profgen.DexFile
  5. plugins {
  6. id 'com.android.application'
  7. id 'org.jetbrains.kotlin.android'
  8. id "org.jetbrains.kotlin.plugin.parcelize"
  9. }
  10. android {
  11. compileSdk 33
  12. defaultConfig {
  13. applicationId "xyz.apiote.bimba.czwek"
  14. minSdk 21
  15. targetSdk 33
  16. versionCode 21
  17. versionName "3.0.1"
  18. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  19. }
  20. buildTypes {
  21. release {
  22. minifyEnabled false
  23. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  24. }
  25. }
  26. compileOptions {
  27. sourceCompatibility JavaVersion.VERSION_1_8
  28. targetCompatibility JavaVersion.VERSION_1_8
  29. coreLibraryDesugaringEnabled true
  30. }
  31. kotlinOptions {
  32. jvmTarget = '1.8'
  33. }
  34. buildFeatures {
  35. viewBinding true
  36. }
  37. namespace 'xyz.apiote.bimba.czwek'
  38. buildToolsVersion '33.0.1'
  39. }
  40. dependencies {
  41. implementation 'androidx.core:core-ktx:1.9.0'
  42. implementation 'androidx.appcompat:appcompat:1.6.1'
  43. implementation 'com.google.android.material:material:1.8.0'
  44. implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
  45. implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.5.1'
  46. implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
  47. implementation 'androidx.navigation:navigation-fragment-ktx:2.5.3'
  48. implementation 'androidx.navigation:navigation-ui-ktx:2.5.3'
  49. implementation 'com.github.mancj:MaterialSearchBar:0.8.5'
  50. implementation 'androidx.legacy:legacy-support-v4:1.0.0'
  51. implementation 'androidx.core:core-splashscreen:1.0.0'
  52. implementation 'com.google.openlocationcode:openlocationcode:1.0.4'
  53. implementation 'org.osmdroid:osmdroid-android:6.1.14'
  54. coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3'
  55. implementation 'org.yaml:snakeyaml:2.0'
  56. implementation project(path: ':fruchtfleisch')
  57. testImplementation 'junit:junit:4.13.2'
  58. androidTestImplementation 'androidx.test.ext:junit:1.1.5'
  59. androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
  60. }
  61. // note fixes reproducible builds
  62. project.afterEvaluate {
  63. tasks.each { task ->
  64. if (task.name.startsWith("compile") && task.name.endsWith("ReleaseArtProfile")) {
  65. task.doLast {
  66. outputs.files.each { file ->
  67. if (file.name.endsWith(".profm")) {
  68. println("Sorting ${file} ...")
  69. def version = ArtProfileSerializer.valueOf("METADATA_0_0_2")
  70. def profile = ArtProfileKt.ArtProfile(file)
  71. def keys = new ArrayList(profile.profileData.keySet())
  72. def sortedData = new LinkedHashMap()
  73. // xxx ignore not resolved classes; gradle can manage
  74. Collections.sort keys, new DexFile.Companion()
  75. keys.each { key -> sortedData[key] = profile.profileData[key] }
  76. new FileOutputStream(file).with {
  77. write(version.magicBytes$profgen)
  78. write(version.versionBytes$profgen)
  79. version.write$profgen(it, sortedData, "")
  80. }
  81. }
  82. }
  83. }
  84. }
  85. }
  86. }