plugins { id 'com.android.application' id 'org.jetbrains.kotlin.android' id 'kotlin-kapt' id 'androidx.navigation.safeargs' } def relStorePassword = System.getenv("RELEASE_STORE_PASSWORD") def relKeyPassword = System.getenv("RELEASE_KEY_PASSWORD") def relKeyAlias = System.getenv("RELEASE_KEY_ALIAS") def keystorePath = System.getenv('PWD') + "/app/keystore.jks" def keystore = file(keystorePath).exists() ? file(keystorePath) : null android { namespace 'com.appttude.h_mal.atlas_weather' compileSdk 33 defaultConfig { applicationId "com.appttude.h_mal.atlas_weather" minSdkVersion MIN_SDK_VERSION targetSdkVersion TARGET_SDK_VERSION versionCode 5 versionName "3.0" testInstrumentationRunner "com.appttude.h_mal.atlas_weather.application.TestRunner" vectorDrawables.useSupportLibrary = true Properties properties = new Properties() if (project.rootProject.file('local.properties').canRead()) { properties.load(project.rootProject.file('local.properties').newDataInputStream()) buildConfigField "String", "ParamOne", properties.getProperty('WEATHER_API') buildConfigField "String", "ParamTwo", properties.getProperty('SEARCH_API') } else { buildConfigField "String", "ParamOne", System.getenv('WEATHER_API') buildConfigField "String", "ParamTwo", System.getenv('SEARCH_API') } } android { sourceSets { test { resources.srcDirs += ['src/test/resources'] } androidTest { resources.srcDirs += ['src/androidTest/resources'] } } } signingConfigs { release { storePassword relStorePassword keyPassword relKeyPassword keyAlias relKeyAlias storeFile keystore } } testOptions { unitTests { includeAndroidResources = true returnDefaultValues = true } } buildTypes { release { signingConfig signingConfigs.release minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } // To inline the bytecode built with JVM target 1.8 into // bytecode that is being built with JVM target 1.6. (e.g. navArgs) compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } kotlinOptions { jvmTarget = "1.8" freeCompilerArgs += [ '-Xjvm-default=all-compatibility' ] } flavorDimensions "default" productFlavors { atlasWeather { applicationId "com.appttude.h_mal.atlas_weather" versionCode 5 versionName "3.0.0" } monoWeather { applicationId "com.appttude.h_mal.monoWeather" versionCode 7 versionName "4.2.0" } } sourceSets { atlasWeather { manifest { srcFile 'src/atlasWeather/AndroidManifest.xml' } } monoWeather { manifest { srcFile 'src/monoWeather/AndroidManifest.xml' } } } lint { abortOnError false } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation "androidx.appcompat:appcompat:$MATERIAL_VERSION" implementation "com.google.android.material:material:$MATERIAL_VERSION" implementation "androidx.constraintlayout:constraintlayout:$CONSTR_LAYOUT_VERSION" implementation "androidx.fragment:fragment:$FRAGMENT_VERSION" implementation "androidx.legacy:legacy-support-v4:$LEGACY_SUPPORT_VERSION" implementation 'androidx.vectordrawable:vectordrawable:1.1.0' implementation "com.google.android.gms:play-services-location:$GOOGLE_PLAY_SERVICE" implementation "org.jetbrains.kotlin:kotlin-stdlib:$KOTLIN_VERSION" implementation 'androidx.cardview:cardview:1.0.0' implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$KOTLINX_COROUTINES" implementation "androidx.preference:preference:$PREFERENCES_VERSION" / * Unit testing * / testImplementation "junit:junit:$JUNIT_VERSION" testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$KOTLIN_VERSION" implementation "org.jetbrains.kotlin:kotlin-test:$KOTLIN_VERSION" androidTestImplementation "junit:junit:$JUNIT_VERSION" testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$KOTLINX_COROUTINES" testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$KOTLINX_COROUTINES" / * Fragment Navigation * / implementation "androidx.navigation:navigation-fragment-ktx:$NAVIGATION_VERSION" implementation "androidx.navigation:navigation-ui-ktx:$NAVIGATION_VERSION" / * android unit testing and espresso * / androidTestImplementation "androidx.test:rules:$TEST_KTX_VERSION" androidTestImplementation 'androidx.test:core:1.5.0' androidTestImplementation 'androidx.test:monitor:1.6.1' androidTestImplementation "androidx.test.ext:junit:$TEST_JUNIT_VERSION" androidTestImplementation "org.jetbrains.kotlin:kotlin-test-junit:$KOTLIN_VERSION" androidTestImplementation "androidx.test.espresso:espresso-core:$ESPRESSO_VERSION" implementation "androidx.test.espresso:espresso-idling-resource:$ESPRESSO_VERSION" androidTestImplementation "androidx.test:runner:$TEST_RUNNER_VERSION" androidTestImplementation "androidx.test.espresso:espresso-contrib:$ESPRESSO_VERSION" androidTestImplementation "androidx.test.espresso:espresso-intents:$ESPRESSO_VERSION" androidTestImplementation "org.hamcrest:hamcrest:$HAMCREST_VERSION" androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$KOTLINX_COROUTINES" / * Universal Image loader */ implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5' / * mock websever for testing retrofit responses * / testImplementation "com.squareup.okhttp3:mockwebserver:4.6.0" testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0" / * mockito and livedata testing * / testImplementation "org.mockito:mockito-inline:$MOKITO_INLINE_VERSION" testImplementation "androidx.arch.core:core-testing:$CORE_TEST_VERSION" testImplementation 'org.mockito:mockito-core:2.19.0' androidTestImplementation 'org.mockito:mockito-core:2.19.0' androidTestImplementation "androidx.arch.core:core-testing:$CORE_TEST_VERSION" / * MockK * / testImplementation "io.mockk:mockk:$MOCKK_VERSION" androidTestImplementation "io.mockk:mockk-android:$MOCKK_VERSION" / * Retrofit * / def retrofit_ver = "2.9.0" implementation "com.squareup.retrofit2:retrofit:$retrofit_ver" implementation "com.squareup.retrofit2:converter-gson:$retrofit_ver" implementation "com.squareup.okhttp3:logging-interceptor:4.9.0" / * Shared prefs * / implementation "androidx.preference:preference-ktx:$PREFERENCES_VERSION" / * Kodein Dependency Injection * / implementation "org.kodein.di:kodein-di-generic-jvm:$KODEIN_VERSION" implementation "org.kodein.di:kodein-di-framework-android-x:$KODEIN_VERSION" / * Room database * / runtimeOnly "androidx.room:room-runtime:$ROOM_VERSION" kapt "androidx.room:room-compiler:$ROOM_VERSION" implementation "androidx.room:room-ktx:$ROOM_VERSION" / * Picasso * / implementation 'com.squareup.picasso:picasso:2.71828' / * coroutine * / implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$KOTLINX_COROUTINES" / * tomtom search * / implementation "com.tomtom.online:sdk-search:$TOMTOM_VERSION" implementation "com.tomtom.online:sdk-maps:$TOMTOM_VERSION" / * coroutines support for firebase operations * / implementation "org.jetbrains.kotlinx:kotlinx-coroutines-play-services:$KOTLINX_COROUTINES" / * Picasso * / implementation 'com.squareup.picasso:picasso:2.71828' / * screenshot library * / androidTestImplementation 'tools.fastlane:screengrab:2.1.1' / * Permissions dispatcher * / implementation "com.github.permissions-dispatcher:permissionsdispatcher:$PERMISSIONS_DISPATCHER" kapt "com.github.permissions-dispatcher:permissionsdispatcher-processor:$PERMISSIONS_DISPATCHER" }