taler-android

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

build.gradle (3912B)


      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 plugins {
     18     id 'com.android.library'
     19     id 'kotlin-android'
     20     id 'kotlinx-serialization'
     21     id "org.jetbrains.kotlin.plugin.compose" version "$kotlin_version"
     22 }
     23 
     24 android {
     25     namespace 'net.taler.common'
     26     compileSdkVersion 36
     27 
     28     defaultConfig {
     29         minSdkVersion 21
     30         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
     31         consumerProguardFiles 'consumer-rules.pro'
     32     }
     33 
     34     buildTypes {
     35         release {
     36             minifyEnabled true
     37             proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
     38         }
     39         debug {
     40             minifyEnabled minify_debug
     41             proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
     42             // Unit-test coverage, so that contrib/ci/jobs/5-coverage can
     43             // report this module on lcov.taler.net.  Costs nothing when the
     44             // tests are not run.
     45             enableUnitTestCoverage true
     46         }
     47     }
     48 
     49     buildFeatures {
     50         viewBinding = true
     51         compose = true
     52     }
     53     compileOptions {
     54         sourceCompatibility = JavaVersion.VERSION_17
     55         targetCompatibility = JavaVersion.VERSION_17
     56     }
     57     kotlinOptions {
     58         jvmTarget = "17"
     59     }
     60     packagingOptions {
     61         resources {
     62             excludes += ['META-INF/*.kotlin_module']
     63         }
     64     }
     65 }
     66 
     67 dependencies {
     68     api platform('androidx.compose:compose-bom:2026.02.01')
     69     api 'androidx.compose.material3:material3'
     70     api 'androidx.compose.ui:ui'
     71     api 'androidx.compose.foundation:foundation'
     72 
     73     implementation 'androidx.appcompat:appcompat:1.7.1'
     74     implementation "com.google.android.material:material:$material_version"
     75     implementation 'androidx.core:core-ktx:1.17.0'
     76     implementation "androidx.constraintlayout:constraintlayout:$constraintlayout_version"
     77     implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0'
     78 
     79     // Navigation
     80     implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
     81     implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
     82 
     83     // ViewModel and LiveData
     84     implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
     85 
     86     // QR codes
     87     implementation 'com.google.zxing:core:3.5.3'  // needs minSdkVersion 24+ or desugar
     88 
     89     // CameraX for QR scanning (shared logic)
     90     implementation "androidx.camera:camera-core:1.5.3"
     91     implementation "androidx.camera:camera-camera2:1.5.3"
     92     implementation "androidx.camera:camera-lifecycle:1.5.3"
     93     implementation "androidx.camera:camera-view:1.5.3"
     94 
     95     // JSON parsing and serialization
     96     api 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.9.0'
     97     testImplementation "junit:junit:$junit_version"
     98     testImplementation 'org.json:json:20250517'
     99 
    100     // Networking
    101     api "io.ktor:ktor-client:$ktor_version"
    102     api "io.ktor:ktor-client-okhttp:$ktor_version"
    103     implementation "io.ktor:ktor-client-serialization-jvm:$ktor_version"
    104     implementation "io.ktor:ktor-serialization-kotlinx-json:$ktor_version"
    105     implementation "io.ktor:ktor-client-content-negotiation:$ktor_version"
    106     implementation("io.ktor:ktor-client-logging:$ktor_version")
    107 }