104 lines
3.5 KiB
Groovy
104 lines
3.5 KiB
Groovy
apply plugin: 'kotlin-kapt'
|
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
apply plugin: 'kotlin-android'
|
|
|
|
apply plugin: 'kotlin-android-extensions'
|
|
|
|
android {
|
|
compileSdkVersion 28
|
|
buildToolsVersion '28.0.3'
|
|
defaultConfig {
|
|
applicationId "bou.amine.apps.mteo"
|
|
minSdkVersion 22
|
|
targetSdkVersion 28
|
|
versionCode 1
|
|
versionName "1.0"
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
|
|
// Enabling multidex support.
|
|
multiDexEnabled true
|
|
lintOptions {
|
|
abortOnError true
|
|
disable 'InvalidPackage'
|
|
}
|
|
vectorDrawables.useSupportLibrary = true
|
|
|
|
javaCompileOptions {
|
|
annotationProcessorOptions {
|
|
arguments = ["room.schemaLocation":
|
|
"$projectDir/schemas".toString()]
|
|
}
|
|
}
|
|
}
|
|
buildTypes {
|
|
all {
|
|
buildConfigField "String", "DARK_SKY_API_KEY", darkSkyApiKey
|
|
}
|
|
release {
|
|
minifyEnabled false
|
|
shrinkResources false
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'),
|
|
'proguard-rules.pro'
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility = '1.8'
|
|
targetCompatibility = '1.8'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
testImplementation 'junit:junit:4.13-beta-3'
|
|
androidTestImplementation 'androidx.test:runner:1.3.0-alpha02'
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha02'
|
|
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
|
|
|
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
|
|
implementation 'androidx.core:core-ktx:1.2.0-alpha02'
|
|
implementation "com.google.android.material:material:1.1.0-alpha09"
|
|
implementation "androidx.recyclerview:recyclerview:1.1.0-beta01"
|
|
implementation "androidx.legacy:legacy-support-v4:1.0.0"
|
|
implementation "androidx.vectordrawable:vectordrawable:1.1.0-rc01"
|
|
implementation "androidx.cardview:cardview:1.0.0"
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'
|
|
|
|
// Retrofit + http logging + okhttp
|
|
implementation 'com.squareup.retrofit2:retrofit:2.6.1'
|
|
implementation 'com.squareup.retrofit2:converter-gson:2.6.1'
|
|
|
|
// glide
|
|
implementation 'com.github.bumptech.glide:glide:4.1.1'
|
|
implementation 'com.github.bumptech.glide:okhttp3-integration:4.1.1'
|
|
|
|
|
|
// Room + lifecycle
|
|
implementation "androidx.lifecycle:lifecycle-livedata:2.2.0-alpha02"
|
|
implementation "androidx.lifecycle:lifecycle-common-java8:2.2.0-alpha02"
|
|
implementation "androidx.room:room-runtime:2.2.0-alpha01"
|
|
kapt "androidx.room:room-compiler:2.2.0-alpha01"
|
|
implementation "android.arch.work:work-runtime-ktx:1.0.1"
|
|
|
|
|
|
// Dialog for adding a new location
|
|
implementation 'com.afollestad.material-dialogs:core:3.1.0'
|
|
implementation 'com.afollestad.material-dialogs:input:3.1.0'
|
|
}
|
|
|
|
|
|
afterEvaluate {
|
|
initApiPropertiesIfNeeded()
|
|
}
|
|
|
|
def initApiPropertiesIfNeeded() {
|
|
def propertiesFile = file(System.getProperty("user.home") + '/.gradle/gradle.properties')
|
|
if (!propertiesFile.exists()) {
|
|
def commentMessage = "This is autogenerated local property from system environment to prevent key to be committed to source control."
|
|
ant.propertyfile(file: System.getProperty("user.home") + "/.gradle/gradle.properties", comment: commentMessage) {
|
|
entry(key: "darkSkyApiKey", value: System.getProperty("darkSkyApiKey"))
|
|
}
|
|
}
|
|
} |