apply plugin: 'com.android.application' apply plugin: "androidx.navigation.safeargs" android { compileSdk 34 defaultConfig { applicationId "com.health.openscale" testApplicationId "com.health.openscale.test" minSdkVersion 23 targetSdkVersion 34 versionCode 66 versionName "2.5.4" manifestPlaceholders = [ appIcon: "@drawable/ic_launcher_openscale", appIconRound: "@mipmap/ic_launcher_openscale_round" ] javaCompileOptions { annotationProcessorOptions { arguments = ["room.schemaLocation": "$projectDir/schemas".toString()] } } buildFeatures { buildConfig = true } testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } sourceSets { androidTest.assets.srcDirs += files("$projectDir/schemas".toString()) } signingConfigs { release { def keystorePropertiesFile = rootProject.file("../../openScale.keystore") def keystoreProperties = new Properties() try { keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) } catch (FileNotFoundException e) { keystoreProperties = null; } if (keystoreProperties != null) { storeFile file(rootDir.getCanonicalPath() + '/' + keystoreProperties['releaseKeyStore']) keyAlias keystoreProperties['releaseKeyAlias'] keyPassword keystoreProperties['releaseKeyPassword'] storePassword keystoreProperties['releaseStorePassword'] } } oss { def keystoreOSSPropertiesFile = rootProject.file("../../openScale_oss.keystore") def keystoreOSSProperties = new Properties() try { keystoreOSSProperties.load(new FileInputStream(keystoreOSSPropertiesFile)) } catch (FileNotFoundException e) { keystoreOSSProperties = null; } if (keystoreOSSProperties != null) { storeFile file(rootDir.getCanonicalPath() + '/' + keystoreOSSProperties['releaseKeyStore']) keyAlias keystoreOSSProperties['releaseKeyAlias'] keyPassword keystoreOSSProperties['releaseKeyPassword'] storePassword keystoreOSSProperties['releaseStorePassword'] } } } buildTypes { debug { // don't include version number into the apk filename for debug build type so Travis can find it applicationVariants.all { variant -> variant.outputs.all { output -> if (variant.buildType.name == "debug") { outputFileName = "openScale-debug.apk" } } } } release { archivesBaseName = "openScale-"+defaultConfig.versionName minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' signingConfig signingConfigs.release } oss { archivesBaseName = "openScale-"+defaultConfig.versionName applicationIdSuffix ".oss" versionNameSuffix "-oss" minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' signingConfig signingConfigs.oss } } compileOptions { coreLibraryDesugaringEnabled true sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } namespace 'com.health.openscale' lint { abortOnError false } } dependencies { coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.3' implementation 'com.google.android.material:material:1.12.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'androidx.appcompat:appcompat:1.7.0' implementation 'androidx.recyclerview:recyclerview:1.3.2' implementation 'androidx.constraintlayout:constraintlayout:2.2.0' implementation 'androidx.preference:preference:1.2.1' implementation 'androidx.navigation:navigation-fragment:2.8.4' implementation 'androidx.navigation:navigation-ui:2.8.4' implementation "android.arch.lifecycle:extensions:1.1.1" annotationProcessor "androidx.lifecycle:lifecycle-common-java8:2.8.7" // MPAndroidChart implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0' // Simple CSV implementation 'com.j256.simplecsv:simplecsv:2.6' // Blessed Android implementation 'com.github.weliem:blessed-android:2.5.0' // CustomActivityOnCrash implementation 'cat.ereza:customactivityoncrash:2.3.0' // AppIntro implementation 'com.github.AppIntro:AppIntro:6.2.0' // implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.8.20' // Room implementation 'androidx.room:room-runtime:2.6.1' annotationProcessor 'androidx.room:room-compiler:2.6.1' androidTestImplementation 'androidx.room:room-testing:2.6.1' // Timber implementation 'com.jakewharton.timber:timber:5.0.1' // Local unit tests testImplementation 'junit:junit:4.13.2' // Instrumented unit tests implementation 'androidx.annotation:annotation:1.9.1' androidTestImplementation 'androidx.test.ext:junit:1.2.1' androidTestImplementation 'androidx.test:rules:1.6.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.6.1' } tasks.withType(Test) { testLogging { exceptionFormat "full" events "started", "skipped", "passed", "failed" showStandardStreams true } }