180 lines
5.7 KiB
Groovy
180 lines
5.7 KiB
Groovy
apply plugin: 'org.handte.gradle-android-eclipse'
|
|
apply plugin: 'com.android.application'
|
|
apply plugin: 'com.google.android.gms.oss-licenses-plugin'
|
|
|
|
description = "Mowesta Android App"
|
|
|
|
ext {
|
|
// android app dependencies
|
|
versionPlay = '17.0.0'
|
|
versionAndroidXCore = '1.2.0'
|
|
versionAndroidXCoreTest = '2.1.0'
|
|
versionAndroidXRecycler = '1.1.0'
|
|
versionAndroidXPaging = '2.1.2'
|
|
versionAndroidXCard = '1.0.0'
|
|
versionAndroidXCoordinator = '1.1.0'
|
|
versionAndroidXConstraint = '2.0.4'
|
|
versionAndroidXNavigation = '2.3.2'
|
|
versionAndroidXLifecycle = '2.2.0'
|
|
versionAndroidXSecurity = '1.1.0-alpha03'
|
|
versionAndroidXViewpager = '1.0.0'
|
|
versionGoogleMaterial = '1.2.1'
|
|
versionAndroidXSwipeRefresh = '1.1.0'
|
|
versionExoPlayer = '2.11.5'
|
|
}
|
|
|
|
|
|
dependencies {
|
|
implementation fileTree(dir: "libs", include: ["*.jar"])
|
|
implementation project(":android-sdk")
|
|
|
|
implementation "javax.xml.bind:jaxb-api:${versionJaxb}"
|
|
|
|
implementation "androidx.appcompat:appcompat:${versionAndroidXAppcompat}"
|
|
|
|
implementation "com.google.android.material:material:${versionGoogleMaterial}"
|
|
implementation "androidx.preference:preference:${versionAndroidXPreference}"
|
|
implementation "androidx.cardview:cardview:${versionAndroidXCard}"
|
|
implementation "androidx.recyclerview:recyclerview:${versionAndroidXRecycler}"
|
|
implementation "androidx.coordinatorlayout:coordinatorlayout:${versionAndroidXCoordinator}"
|
|
implementation "androidx.constraintlayout:constraintlayout:${versionAndroidXConstraint}"
|
|
implementation "androidx.viewpager2:viewpager2:${versionAndroidXViewpager}"
|
|
implementation "androidx.swiperefreshlayout:swiperefreshlayout:${versionAndroidXSwipeRefresh}"
|
|
|
|
implementation "androidx.security:security-crypto:${versionAndroidXSecurity}"
|
|
|
|
implementation "androidx.lifecycle:lifecycle-viewmodel:${versionAndroidXLifecycle}"
|
|
implementation "androidx.lifecycle:lifecycle-livedata:${versionAndroidXLifecycle}"
|
|
implementation "androidx.lifecycle:lifecycle-runtime:${versionAndroidXLifecycle}"
|
|
implementation "androidx.lifecycle:lifecycle-viewmodel-savedstate:${versionAndroidXLifecycle}"
|
|
implementation "androidx.lifecycle:lifecycle-common-java8:${versionAndroidXLifecycle}"
|
|
implementation "androidx.lifecycle:lifecycle-service:${versionAndroidXLifecycle}"
|
|
implementation "androidx.lifecycle:lifecycle-process:${versionAndroidXLifecycle}"
|
|
|
|
|
|
implementation "com.google.android.exoplayer:exoplayer-core:${versionExoPlayer}"
|
|
implementation "com.google.android.exoplayer:exoplayer-ui:${versionExoPlayer}"
|
|
|
|
|
|
implementation "androidx.room:room-runtime:${versionAndroidXRoom}"
|
|
annotationProcessor "androidx.room:room-compiler:${versionAndroidXRoom}"
|
|
testImplementation "androidx.room:room-testing:${versionAndroidXRoom}"
|
|
|
|
implementation "androidx.paging:paging-runtime:${versionAndroidXPaging}"
|
|
testImplementation "androidx.paging:paging-common:${versionAndroidXPaging}"
|
|
|
|
implementation "androidx.navigation:navigation-fragment:${versionAndroidXNavigation}"
|
|
implementation "androidx.navigation:navigation-ui:${versionAndroidXNavigation}"
|
|
androidTestImplementation "androidx.navigation:navigation-testing:${versionAndroidXNavigation}"
|
|
|
|
implementation "com.google.android.gms:play-services-oss-licenses:${versionPlay}"
|
|
|
|
testImplementation "junit:junit:${versionJunit}"
|
|
testImplementation "androidx.test:core:${versionAndroidXTest}"
|
|
testImplementation "androidx.arch.core:core-testing:${versionAndroidXCoreTest}"
|
|
testImplementation "org.robolectric:robolectric:${versionRobolectric}"
|
|
|
|
}
|
|
|
|
configurations {
|
|
all {
|
|
exclude group: 'com.google.auto.service', module: 'auto-service'
|
|
}
|
|
}
|
|
|
|
|
|
android {
|
|
compileSdkVersion 29
|
|
defaultConfig {
|
|
applicationId "com.mowesta.android.app"
|
|
minSdkVersion 19
|
|
targetSdkVersion 29
|
|
versionCode 15
|
|
versionName "${version}"
|
|
buildConfigField "long", "BUILD_TIME", System.currentTimeMillis() + "L"
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
resValue "string", "application_long", "MoWeSta"
|
|
multiDexEnabled true
|
|
vectorDrawables {
|
|
useSupportLibrary = true
|
|
}
|
|
}
|
|
|
|
signingConfigs {
|
|
release {
|
|
storeFile file("src/main/key/mowesta.jks")
|
|
keyAlias "app"
|
|
storePassword System.properties['android.keystore.password']
|
|
keyPassword System.properties['android.keystore.password']
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
// add signing config if key is provided via system property
|
|
if (System.properties['android.keystore.password'] != null) signingConfig signingConfigs.release
|
|
}
|
|
|
|
debug {
|
|
applicationIdSuffix ".debug"
|
|
versionNameSuffix "-dbg"
|
|
resValue "string", "application_long", "MoWeSta (Debug)"
|
|
}
|
|
}
|
|
|
|
buildFeatures {
|
|
dataBinding = true
|
|
}
|
|
|
|
testOptions {
|
|
unitTests {
|
|
includeAndroidResources = true
|
|
}
|
|
}
|
|
|
|
lintOptions {
|
|
// FragmentTagUsage: replacing fragment with FragmentContainerView breaks Navigation library
|
|
// RelativeOverlayp: occurs in video frame which is what we want
|
|
// VectorPath: our map and logo representations are very long vectors (consider compressing)
|
|
disable 'RelativeOverlap', 'FragmentTagUsage', 'VectorPath'
|
|
abortOnError false
|
|
}
|
|
|
|
dexOptions {
|
|
javaMaxHeapSize "512m"
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
}
|
|
|
|
|
|
// enable unchecked and deprecation warning during compilation
|
|
gradle.projectsEvaluated {
|
|
tasks.withType(JavaCompile) {
|
|
options.encoding = 'UTF-8'
|
|
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
|
|
}
|
|
}
|
|
|
|
configurations {
|
|
eclipseConfig.extendsFrom implementation
|
|
eclipseTestConfig.extendsFrom testImplementation
|
|
}
|
|
|
|
eclipse {
|
|
classpath {
|
|
plusConfigurations += [
|
|
configurations.eclipseConfig,
|
|
configurations.eclipseTestConfig,
|
|
]
|
|
downloadSources = true
|
|
}
|
|
}
|
|
|
|
|