From 259d89e8bc1257569fcb043d97fd9dcc9f680abf Mon Sep 17 00:00:00 2001 From: Murtadha Saad Date: Sun, 15 Mar 2020 11:45:37 +0300 Subject: [PATCH 1/2] decrease min sdk to 16 --- versions.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions.gradle b/versions.gradle index 3ff0d9d..1acee44 100644 --- a/versions.gradle +++ b/versions.gradle @@ -51,7 +51,7 @@ deps.build = build def build_versions = [:] build_versions.compile_sdk = 29 -build_versions.min_sdk = 22 +build_versions.min_sdk = 16 build_versions.target_sdk = 29 deps.build_versions = build_versions From e69073fc79567ef39308e26eb290405a1da12747 Mon Sep 17 00:00:00 2001 From: Murtadha Saad Date: Sun, 15 Mar 2020 21:39:32 +0300 Subject: [PATCH 2/2] fix bug related to scheme constants class import --- .../main/resources/co/windly/ktxaccount/compiler/scheme.ftl | 4 ++-- .../utility/account/{AccountDefinition.kt => User.kt} | 2 +- .../kotlindagger/utility/manager/AccountUtilityManager.kt | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) rename samples/kotlin-dagger/src/main/java/co/windly/ktxaccount/sample/kotlindagger/utility/account/{AccountDefinition.kt => User.kt} (98%) diff --git a/ktx-account-compiler/src/main/resources/co/windly/ktxaccount/compiler/scheme.ftl b/ktx-account-compiler/src/main/resources/co/windly/ktxaccount/compiler/scheme.ftl index 4ace846..eba5044 100644 --- a/ktx-account-compiler/src/main/resources/co/windly/ktxaccount/compiler/scheme.ftl +++ b/ktx-account-compiler/src/main/resources/co/windly/ktxaccount/compiler/scheme.ftl @@ -8,8 +8,8 @@ import co.windly.ktxaccount.runtime.scheme.MultipleAccountScheme import co.windly.ktxaccount.runtime.scheme.SingleAccountScheme <#list descriptorList as descriptor> -import ${package}.AccountDefinitionConstants.Companion.DEFAULT_${descriptor.fieldNameUpperCase} -import ${package}.AccountDefinitionConstants.Companion.KEY_${descriptor.fieldNameUpperCase} +import ${package}.${constantsClassName}.Companion.DEFAULT_${descriptor.fieldNameUpperCase} +import ${package}.${constantsClassName}.Companion.KEY_${descriptor.fieldNameUpperCase} import io.reactivex.BackpressureStrategy.LATEST import io.reactivex.Completable diff --git a/samples/kotlin-dagger/src/main/java/co/windly/ktxaccount/sample/kotlindagger/utility/account/AccountDefinition.kt b/samples/kotlin-dagger/src/main/java/co/windly/ktxaccount/sample/kotlindagger/utility/account/User.kt similarity index 98% rename from samples/kotlin-dagger/src/main/java/co/windly/ktxaccount/sample/kotlindagger/utility/account/AccountDefinition.kt rename to samples/kotlin-dagger/src/main/java/co/windly/ktxaccount/sample/kotlindagger/utility/account/User.kt index b70eeb1..42f3189 100644 --- a/samples/kotlin-dagger/src/main/java/co/windly/ktxaccount/sample/kotlindagger/utility/account/AccountDefinition.kt +++ b/samples/kotlin-dagger/src/main/java/co/windly/ktxaccount/sample/kotlindagger/utility/account/User.kt @@ -10,7 +10,7 @@ import co.windly.ktxaccount.annotation.DefaultLong import co.windly.ktxaccount.annotation.DefaultString @AccountScheme(mode = Mode.SINGLE) -class AccountDefinition( +class User( //region Id diff --git a/samples/kotlin-dagger/src/main/java/co/windly/ktxaccount/sample/kotlindagger/utility/manager/AccountUtilityManager.kt b/samples/kotlin-dagger/src/main/java/co/windly/ktxaccount/sample/kotlindagger/utility/manager/AccountUtilityManager.kt index 3fbc2e3..d907f99 100644 --- a/samples/kotlin-dagger/src/main/java/co/windly/ktxaccount/sample/kotlindagger/utility/manager/AccountUtilityManager.kt +++ b/samples/kotlin-dagger/src/main/java/co/windly/ktxaccount/sample/kotlindagger/utility/manager/AccountUtilityManager.kt @@ -1,7 +1,7 @@ package co.windly.ktxaccount.sample.kotlindagger.utility.manager import android.content.Context -import co.windly.ktxaccount.sample.kotlindagger.utility.account.AccountDefinitionScheme +import co.windly.ktxaccount.sample.kotlindagger.utility.account.UserScheme import io.reactivex.annotations.SchedulerSupport import io.reactivex.annotations.SchedulerSupport.IO import javax.inject.Inject @@ -10,7 +10,7 @@ import javax.inject.Singleton @Singleton @SchedulerSupport(value = IO) class AccountUtilityManager @Inject constructor(context: Context) : - AccountDefinitionScheme(context) { + UserScheme(context) { //region Authenticator