taler-android

Android apps for GNU Taler (wallet, PoS, cashier)
Log | Files | Refs | README | LICENSE

build.gradle (2647B)


      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             // Unit-test coverage, so that contrib/ci/jobs/5-coverage can
     45             // report this module on lcov.taler.net.  Costs nothing when the
     46             // tests are not run.
     47             enableUnitTestCoverage true
     48         }
     49     }
     50     compileOptions {
     51         sourceCompatibility = JavaVersion.VERSION_17
     52         targetCompatibility = JavaVersion.VERSION_17
     53     }
     54     kotlinOptions {
     55         jvmTarget = "17"
     56     }
     57 }
     58 
     59 dependencies {
     60     api project(":taler-kotlin-android")
     61 
     62     api "io.ktor:ktor-client:$ktor_version"
     63     api "io.ktor:ktor-client-okhttp:$ktor_version"
     64     api "io.ktor:ktor-client-serialization-jvm:$ktor_version"
     65     api "io.ktor:ktor-client-content-negotiation:$ktor_version"
     66     implementation "io.ktor:ktor-serialization-kotlinx-json:$ktor_version"
     67     implementation "io.ktor:ktor-server-call-logging:$ktor_version"
     68 
     69     testImplementation "junit:junit:$junit_version"
     70     testImplementation "io.ktor:ktor-client-mock-jvm:$ktor_version"
     71     testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.10.2'
     72 }
     73 
     74 tasks.withType(KotlinCompile).configureEach {
     75     compilerOptions {
     76         freeCompilerArgs.add("-opt-in=kotlin.RequiresOptIn")
     77     }
     78 }