11apply plugin : ' com.android.application'
2+ apply plugin : ' com.google.gms.google-services'
23apply plugin : ' kotlin-android'
34apply plugin : ' kotlin-android-extensions'
45apply plugin : ' kotlin-kapt'
5- apply plugin : ' io.fabric '
6+ apply plugin : ' com.google.firebase.crashlytics '
67apply plugin : " de.mannodermaus.android-junit5"
78apply plugin : ' com.antonchaynikov.oneclickpublish'
9+ apply plugin : ' com.apollographql.apollo'
810
911def props = new Properties ()
1012def secretFile = rootProject. file(" secrets/keys.properties" )
@@ -14,7 +16,6 @@ if (secretFile.exists())
1416detekt {
1517 toolVersion = " $versions . detekt "
1618 input = files(" src/main/java" )
17- filters = " .*/resources/.*,.*/build/.*"
1819 config = files(" ../default-detekt-config.yml" )
1920}
2021
@@ -30,7 +31,7 @@ android {
3031 testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
3132 testInstrumentationRunnerArgument " runnerBuilder" ,
3233 " de.mannodermaus.junit5.AndroidJUnit5Builder"
33- buildConfigField ' String' , ' BASE_URL' , " \" https://api.com\" "
34+ buildConfigField ' String' , ' BASE_URL' , " \" https://rails-base-graphql- api.herokuapp. com/graphql \" "
3435
3536 oneClickPublish {
3637 branchNames = [" master" ] // branch names from which you can deploy, master by default
@@ -81,21 +82,32 @@ android {
8182 sourceCompatibility 1.8
8283 targetCompatibility 1.8
8384 }
85+ kotlinOptions {
86+ jvmTarget = ' 1.8'
87+ freeCompilerArgs = [' -Xjvm-default=enable' ,
88+ " -Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi" ,
89+ " -Xuse-experimental=kotlinx.coroutines.ObsoleteCoroutinesApi" ]
90+ }
8491 androidExtensions {
8592 experimental = true
8693 }
8794}
8895
96+ apollo {
97+ generateKotlinModels. set(true )
98+ }
99+
89100repositories {
90101 maven { url = uri(" https://dl.bintray.com/kodein-framework/Kodein-DI" ) }
91102}
92103
93104dependencies {
94105 implementation fileTree(dir : ' libs' , include : [' *.jar' ])
95106 implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk8:$versions . kotlin "
107+ implementation ' com.google.code.gson:gson:2.8.6'
96108
97109 implementation androidLibs
98- implementation retrofitLibs
110+ implementation apolloLibs
99111 implementation coroutinesLibs
100112 implementation kodeinLibs
101113 implementation roomLibs
@@ -104,10 +116,9 @@ dependencies {
104116 testImplementation unitTestLibs
105117 androidTestImplementation androidTestsLibs
106118
107- // Crashlytics
108- implementation(' com.crashlytics.sdk.android:crashlytics:2.10.1@aar' ) {
109- transitive = true
110- }
119+ implementation platform(' com.google.firebase:firebase-bom:25.12.0' )
120+ implementation ' com.google.firebase:firebase-crashlytics-ktx'
121+ implementation ' com.google.firebase:firebase-analytics-ktx'
111122
112123 testRuntimeOnly " org.jetbrains.kotlin:kotlin-reflect:$versions . kotlin "
113124}
0 commit comments