build.gradle (2422B)
1 /* 2 * This file is part of GNU Taler 3 * (C) 2020 Taler Systems S.A. 4 * 5 * GNU Taler is free software; you can redistribute it and/or modify it under the 6 * terms of the GNU General Public License as published by the Free Software 7 * Foundation; either version 3, or (at your option) any later version. 8 * 9 * GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY 10 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 11 * A PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 * 13 * You should have received a copy of the GNU General Public License along with 14 * GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> 15 */ 16 17 import org.jetbrains.kotlin.gradle.tasks.KotlinCompile 18 19 plugins { 20 id 'com.android.library' 21 id 'kotlin-android' 22 id 'kotlinx-serialization' 23 } 24 25 android { 26 namespace 'net.taler.merchantlib' 27 compileSdkVersion 36 28 29 defaultConfig { 30 minSdkVersion 21 31 32 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 33 consumerProguardFiles "consumer-rules.pro" 34 } 35 36 buildTypes { 37 release { 38 minifyEnabled true 39 proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 40 } 41 debug { 42 minifyEnabled minify_debug 43 proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 44 } 45 } 46 compileOptions { 47 sourceCompatibility = JavaVersion.VERSION_17 48 targetCompatibility = JavaVersion.VERSION_17 49 } 50 kotlinOptions { 51 jvmTarget = "17" 52 } 53 } 54 55 dependencies { 56 api project(":taler-kotlin-android") 57 58 api "io.ktor:ktor-client:$ktor_version" 59 api "io.ktor:ktor-client-okhttp:$ktor_version" 60 api "io.ktor:ktor-client-serialization-jvm:$ktor_version" 61 api "io.ktor:ktor-client-content-negotiation:$ktor_version" 62 implementation "io.ktor:ktor-serialization-kotlinx-json:$ktor_version" 63 implementation "io.ktor:ktor-server-call-logging:$ktor_version" 64 65 testImplementation "junit:junit:$junit_version" 66 testImplementation "io.ktor:ktor-client-mock-jvm:$ktor_version" 67 testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.10.2' 68 } 69 70 tasks.withType(KotlinCompile).configureEach { 71 compilerOptions { 72 freeCompilerArgs.add("-opt-in=kotlin.RequiresOptIn") 73 } 74 }