ref: 46c7a266c202f03ccd8708d959b080cf2db6a82d
app/build.gradle
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
// SPDX-FileCopyrightText: Adam Evyčędo // // SPDX-License-Identifier: GPL-3.0-or-later import com.android.tools.profgen.ArtProfileKt import com.android.tools.profgen.ArtProfileSerializer import com.android.tools.profgen.DexFile plugins { id 'com.android.application' id 'org.jetbrains.kotlin.android' id "org.jetbrains.kotlin.plugin.parcelize" id 'org.jetbrains.kotlin.plugin.serialization' version '1.9.22' id 'com.mermake.locale-resource-generator' version '0.1' id "com.google.protobuf" version "0.9.4" } android { compileSdk 34 // https://gitlab.com/fdroid/fdroiddata/-/issues/3299#note_1989808414 defaultConfig { applicationId "xyz.apiote.bimba.czwek" minSdk 21 targetSdk 35 versionCode 28 versionName "3.4.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" resourceConfigurations += ["en", "pl", "it", "de", "fr", "en-rUS"] } applicationVariants.configureEach { variant -> variant.resValue "string", "versionName", variant.versionName variant.resValue "string", "applicationId", variant.applicationId } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } compileOptions { sourceCompatibility = 17 targetCompatibility = 17 coreLibraryDesugaringEnabled true } buildFeatures { viewBinding true } namespace 'xyz.apiote.bimba.czwek' buildToolsVersion = '34.0.0' // https://gitlab.com/fdroid/fdroiddata/-/issues/3299#note_1989808414 } dependencies { implementation 'androidx.core:core-ktx:1.13.1' implementation 'androidx.appcompat:appcompat:1.7.0' implementation 'com.google.android.material:material:1.12.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.8.3' implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.3' implementation 'androidx.navigation:navigation-fragment-ktx:2.7.7' implementation 'androidx.navigation:navigation-ui-ktx:2.7.7' implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'androidx.core:core-splashscreen:1.0.1' implementation 'com.google.openlocationcode:openlocationcode:1.0.4' implementation 'org.osmdroid:osmdroid-android:6.1.18' implementation 'org.yaml:snakeyaml:2.2' implementation 'androidx.activity:activity-ktx:1.9.0' implementation 'com.google.openlocationcode:openlocationcode:1.0.4' implementation 'com.otaliastudios:zoomlayout:1.9.0' implementation 'dev.bandb.graphview:graphview:0.8.1' implementation 'org.jetbrains.kotlinx:kotlinx-serialization-core:1.6.3' implementation 'com.github.jershell:kbson:0.5.0' implementation 'androidx.preference:preference-ktx:1.2.1' implementation 'androidx.work:work-runtime-ktx:2.9.0' implementation 'com.github.doyaaaaaken:kotlin-csv-jvm:1.9.3' implementation 'commons-io:commons-io:2.16.1' implementation project(path: ':fruchtfleisch') coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4' testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.2.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' } // NOTE fixes reproducible builds project.afterEvaluate { tasks.each { task -> if (task.name.startsWith("compile") && task.name.endsWith("ReleaseArtProfile")) { task.doLast { outputs.files.each { file -> if (file.name.endsWith(".profm")) { println("Sorting ${file} ...") def version = ArtProfileSerializer.valueOf("METADATA_0_0_2") def profile = ArtProfileKt.ArtProfile(file) def keys = new ArrayList(profile.profileData.keySet()) def sortedData = new LinkedHashMap() Collections.sort keys, new DexFile.Companion() keys.each { key -> sortedData[key] = profile.profileData[key] } new FileOutputStream(file).with { write(version.magicBytes$profgen) write(version.versionBytes$profgen) version.write$profgen(it, sortedData, "") } } } } } } } |