diff --git a/app/.gitignore b/app/.gitignore index 42afabf..796b96d 100644 --- a/app/.gitignore +++ b/app/.gitignore @@ -1 +1 @@ -/build \ No newline at end of file +/build diff --git a/app/build.gradle b/app/build.gradle index f7fa9a7..e9486af 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,12 +1,11 @@ -apply from: '../versions.gradle' - plugins { id 'com.android.application' id 'kotlin-android' - id 'kotlin-android-extensions' id 'kotlin-kapt' } +apply from: '../versions.gradle' + android { compileSdkVersion build_versions.target_sdk buildToolsVersion build_versions.build_tools @@ -55,11 +54,5 @@ android { } dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - implementation 'androidx.core:core-ktx:1.3.1' - implementation 'androidx.appcompat:appcompat:1.2.0' - implementation 'com.google.android.material:material:1.3.0' - testImplementation 'junit:junit:4.+' - androidTestImplementation 'androidx.test.ext:junit:1.1.2' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' + implementation project(":core") } \ No newline at end of file diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 481bb43..f1b4245 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -18,4 +18,4 @@ # If you keep the line number information, uncomment this to # hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file +#-renamesourcefileattribute SourceFile diff --git a/base.gradle b/base.gradle index 81761df..e238a3c 100644 --- a/base.gradle +++ b/base.gradle @@ -1,7 +1,6 @@ apply from: '../versions.gradle' apply plugin: 'com.android.library' apply plugin: 'kotlin-android' -apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-kapt' android { @@ -33,5 +32,5 @@ android { } dependencies { - kapt deps.room.compiler + kapt deps.core.room.compiler } diff --git a/core/.gitignore b/core/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/core/.gitignore @@ -0,0 +1 @@ +/build diff --git a/core/build.gradle b/core/build.gradle new file mode 100644 index 0000000..f8de13d --- /dev/null +++ b/core/build.gradle @@ -0,0 +1,30 @@ +apply from: '../versions.gradle' +apply from: '../base.gradle' +apply plugin: 'com.android.library' +apply plugin: 'kotlin-android' +apply plugin: 'kotlin-kapt' + +dependencies { + api deps.google.kotlin.std_lib + api deps.google.androidx.appcompat + api deps.google.androidx.core_ktx + api deps.google.androidx.constraint_layout + api deps.google.androidx.lifecycle_ext + api deps.google.androidx.lifecycle_viewmodel + api deps.google.androidx.recycler_view + api deps.google.androidx.navigation_fragment + api deps.google.androidx.navigation_ui + api deps.core.okhttp.logging_interceptor + api deps.core.retrofit.runtime + api deps.core.retrofit.gson + api deps.core.retrofit.rx + api deps.core.room.runtime + api deps.core.koin.core + api deps.core.koin.scope + api deps.core.koin.viewmodel + api deps.core.rx.core + api deps.core.rx.android + api deps.core.thirdparty.timber + + kapt deps.core.room.compiler +} diff --git a/core/proguard-rules.pro b/core/proguard-rules.pro new file mode 100644 index 0000000..f1b4245 --- /dev/null +++ b/core/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile diff --git a/core/src/main/AndroidManifest.xml b/core/src/main/AndroidManifest.xml new file mode 100644 index 0000000..30592ff --- /dev/null +++ b/core/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ + + diff --git a/core/src/main/res/drawable-v24/ic_launcher_foreground.xml b/core/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000..1448aba --- /dev/null +++ b/core/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/core/src/main/res/drawable/ic_launcher_background.xml b/core/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..445d0d5 --- /dev/null +++ b/core/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,204 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/core/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/core/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..03eed25 --- /dev/null +++ b/core/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/core/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/core/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000..03eed25 --- /dev/null +++ b/core/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/core/src/main/res/mipmap-hdpi/ic_launcher.png b/core/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..a571e60 Binary files /dev/null and b/core/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/core/src/main/res/mipmap-hdpi/ic_launcher_round.png b/core/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 0000000..61da551 Binary files /dev/null and b/core/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/core/src/main/res/mipmap-mdpi/ic_launcher.png b/core/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..c41dd28 Binary files /dev/null and b/core/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/core/src/main/res/mipmap-mdpi/ic_launcher_round.png b/core/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 0000000..db5080a Binary files /dev/null and b/core/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/core/src/main/res/mipmap-xhdpi/ic_launcher.png b/core/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..6dba46d Binary files /dev/null and b/core/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/core/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/core/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 0000000..da31a87 Binary files /dev/null and b/core/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/core/src/main/res/mipmap-xxhdpi/ic_launcher.png b/core/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..15ac681 Binary files /dev/null and b/core/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/core/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/core/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 0000000..b216f2d Binary files /dev/null and b/core/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/core/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/core/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..f25a419 Binary files /dev/null and b/core/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/core/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/core/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 0000000..e96783c Binary files /dev/null and b/core/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/core/src/main/res/values-night/themes.xml b/core/src/main/res/values-night/themes.xml new file mode 100644 index 0000000..7558bbb --- /dev/null +++ b/core/src/main/res/values-night/themes.xml @@ -0,0 +1,19 @@ + + + + \ No newline at end of file diff --git a/core/src/main/res/values/colors.xml b/core/src/main/res/values/colors.xml new file mode 100644 index 0000000..09837df --- /dev/null +++ b/core/src/main/res/values/colors.xml @@ -0,0 +1,10 @@ + + + #FFBB86FC + #FF6200EE + #FF3700B3 + #FF03DAC5 + #FF018786 + #FF000000 + #FFFFFFFF + \ No newline at end of file diff --git a/core/src/main/res/values/strings.xml b/core/src/main/res/values/strings.xml new file mode 100644 index 0000000..75f77d2 --- /dev/null +++ b/core/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + core + \ No newline at end of file diff --git a/core/src/main/res/values/themes.xml b/core/src/main/res/values/themes.xml new file mode 100644 index 0000000..a6cea39 --- /dev/null +++ b/core/src/main/res/values/themes.xml @@ -0,0 +1,19 @@ + + + + \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 26285aa..e89e7cc 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,2 +1,2 @@ rootProject.name = "Acronyms" -include ':app' +include ':app', ':core' diff --git a/versions.gradle b/versions.gradle index c98d94c..c3a1d28 100644 --- a/versions.gradle +++ b/versions.gradle @@ -10,18 +10,16 @@ versions.androidx_constraint_layout = "2.0.4" versions.androidx_lifecycle = "2.2.0" versions.androidx_recycler_view = "1.2.0" versions.androidx_navigation = "2.3.5" -versions.okhttp_logging_interceptor = "4.9.1" +versions.okhttp_interceptor = "4.9.1" versions.retrofit = "2.9.0" versions.timber = "4.7.1" -versions.koin = "2.2.2" +versions.koin = "2.2.3" versions.rx_core = "2.2.21" versions.rx_android = "2.1.1" versions.junit = "4.13.2" versions.test = "1.3.0" versions.test_ext = "1.1.2" versions.espresso = "3.3.0" -versions.lottie = "3.7.0" -versions.picasso = "2.71828" def build_versions = [:] build_versions.min_sdk = 21 @@ -61,9 +59,9 @@ room.runtime = "androidx.room:room-runtime:$versions.room" room.compiler = "androidx.room:room-compiler:$versions.room" def koin = [:] -koin.core = "org.koin:koin-android:$versions.koin" -koin.scope = "org.koin:koin-androidx-scope:$versions.koin" -koin.viewmodel = "org.koin:koin-androidx-viewmodel:$versions.koin" +koin.core = "io.insert-koin:koin-android:$versions.koin" +koin.scope = "io.insert-koin:koin-androidx-scope:$versions.koin" +koin.viewmodel = "io.insert-koin:koin-androidx-viewmodel:$versions.koin" def rx = [:] rx.core = "io.reactivex.rxjava2:rxjava:$versions.rx_core" @@ -81,8 +79,6 @@ retrofit.rx = "com.squareup.retrofit2:adapter-rxjava2:$versions.retrofit" def thirdparty = [:] thirdparty.timber = "com.jakewharton.timber:timber:$versions.timber" -thirdparty.lottie = "com.airbnb.android:lottie:$versions.lottie" -thirdparty.picasso = "com.squareup.picasso:picasso:$versions.picasso" def core = [:] core.room = room @@ -107,8 +103,7 @@ ext.deps = deps static def addRepos(RepositoryHandler handler) { handler.google() - handler.jcenter() - handler.maven { url 'https://oss.sonatype.org/content/repositories/snapshots' } + handler.mavenCentral() } ext.addRepos = this.&addRepos