123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- // 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'
- }
- android {
- compileSdk 34
- defaultConfig {
- applicationId "xyz.apiote.bimba.czwek"
- minSdk 21
- targetSdk 34
- versionCode 23
- versionName "3.1.1"
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- resourceConfigurations += ["en", "pl", "it"]
- }
- applicationVariants.configureEach { variant ->
- variant.resValue "string", "versionName", variant.versionName
- }
- 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'
- }
- dependencies {
- implementation 'androidx.core:core-ktx:1.12.0'
- implementation 'androidx.appcompat:appcompat:1.6.1'
- implementation 'com.google.android.material:material:1.11.0'
- implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
- implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.7.0'
- implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0'
- 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.8.2'
- 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 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.1.5'
- androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.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, "")
- }
- }
- }
- }
- }
- }
- }
|