From 7f3aa5e9e1ce9f14ff41416869f07ea83081ad3a Mon Sep 17 00:00:00 2001 From: TacoTheDank Date: Fri, 31 Jul 2020 19:56:40 -0400 Subject: [PATCH] Clean up gradles --- app/build.gradle | 57 ++++++++++---------------------- app/src/main/AndroidManifest.xml | 3 +- build.gradle | 10 +++--- 3 files changed, 25 insertions(+), 45 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index e96c1b0..0ef775d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -5,7 +5,7 @@ apply plugin: 'androidx.navigation.safeargs.kotlin' android { compileSdkVersion 29 - // buildToolsVersion is optional because the plugin uses a recommended version by default + buildToolsVersion "29.0.3" defaultConfig { applicationId 'org.y20k.trackbook' @@ -25,63 +25,42 @@ android { targetCompatibility JavaVersion.VERSION_1_8 } - lintOptions{ - disable 'MissingTranslation' + lintOptions { + disable 'MissingTranslation', 'GoogleAppIndexingWarning' } buildTypes { release { - // Enables code shrinking, obfuscation, and optimization for only - // your project's release build type. minifyEnabled true - - // Enables resource shrinking, which is performed by the - // Android Gradle plugin. shrinkResources true - - // Includes the default ProGuard rules files that are packaged with - // the Android Gradle plugin. To learn more, go to the section about - // R8 configuration files. - proguardFiles getDefaultProguardFile( - 'proguard-android-optimize.txt'), - 'proguard-rules.pro' + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } - debug { - // Comment out the below lines if you do not need to test resource shrinking -// minifyEnabled true -// shrinkResources true -// proguardFiles getDefaultProguardFile( -// 'proguard-android-optimize.txt'), -// 'proguard-rules.pro' + applicationIdSuffix ".debug" } - } - } dependencies { - implementation fileTree(dir: 'libs', include: ['*.jar']) - +// Kotlin implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.4" - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.4" + implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.4' + implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.4' +// AndroidX implementation 'androidx.appcompat:appcompat:1.1.0' - implementation "androidx.core:core-ktx:1.3.1" implementation 'androidx.constraintlayout:constraintlayout:1.1.3' - implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' - implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0' - implementation "androidx.preference:preference-ktx:1.1.1" + implementation 'androidx.core:core-ktx:1.3.1' + implementation "androidx.navigation:navigation-fragment-ktx:$navigation_version" + implementation "androidx.navigation:navigation-ui-ktx:$navigation_version" + implementation 'androidx.preference:preference-ktx:1.1.1' + implementation 'com.google.android.material:material:1.2.0-beta01' - implementation 'androidx.navigation:navigation-fragment-ktx:2.3.0' - implementation 'androidx.navigation:navigation-ui-ktx:2.3.0' +// Gson + implementation 'com.google.code.gson:gson:2.8.6' - - implementation "com.google.android.material:material:1.2.0-beta01" - implementation "com.google.code.gson:gson:2.8.6" - - implementation "org.osmdroid:osmdroid-android:6.1.8" +// OpenStreetMap + implementation 'org.osmdroid:osmdroid-android:6.1.8' } androidExtensions { diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 5c7bfd6..a3398c8 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -24,8 +24,7 @@ android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" - android:theme="@style/AppTheme" - tools:ignore="GoogleAppIndexingWarning"> + android:theme="@style/AppTheme"> diff --git a/build.gradle b/build.gradle index 99001d1..fddfa3d 100644 --- a/build.gradle +++ b/build.gradle @@ -1,16 +1,19 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.3.72' + ext { + kotlin_version = '1.3.72' + navigation_version = '2.3.0' + } repositories { google() jcenter() - } dependencies { classpath 'com.android.tools.build:gradle:4.0.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.3.0" + classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$navigation_version" + // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } @@ -20,7 +23,6 @@ allprojects { repositories { google() jcenter() - } }