Skip to content

Commit

Permalink
updated to new sekret version
Browse files Browse the repository at this point in the history
  • Loading branch information
DatL4g committed Apr 14, 2024
1 parent 0da0870 commit 0efba8b
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 25 deletions.
4 changes: 3 additions & 1 deletion composeApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ sekret {
enabled.set(true)
packageName.set(artifact)

androidJNIFolder.set(project.layout.projectDirectory.dir("src/androidMain/jniLibs"))
nativeCopy {
androidJNIFolder.set(project.layout.projectDirectory.dir("src/androidMain/jniLibs"))
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion composeApp/sekret/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ kotlin {

sourceSets {
commonMain.dependencies {
api("dev.datlag.sekret:sekret:2.0.0-alpha-01")
api("dev.datlag.sekret:sekret:2.0.0-alpha-04")
}

val jniNativeMain by creating {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,6 @@ actual object PlatformModule {
FirebaseFactory.Empty
}
}
bindSingleton(Constants.Sekret.ANILIST_CLIENT_ID) {
Sekret.anilistClientId(BuildKonfig.packageName) ?: ""
}
bindSingleton(Constants.Sekret.ANILIST_CLIENT_SECRET) {
Sekret.anilistClientSecret(BuildKonfig.packageName) ?: ""
}
bindSingleton {
val app: Context = instance()
DataStoreFactory.create(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import com.apollographql.apollo3.api.http.HttpRequest
import com.apollographql.apollo3.api.http.HttpResponse
import com.apollographql.apollo3.network.http.HttpInterceptor
import com.apollographql.apollo3.network.http.HttpInterceptorChain
import dev.datlag.aniflow.BuildKonfig
import dev.datlag.aniflow.Sekret
import dev.datlag.aniflow.anilist.AiringTodayStateMachine
import dev.datlag.aniflow.anilist.PopularNextSeasonStateMachine
import dev.datlag.aniflow.anilist.PopularSeasonStateMachine
Expand Down Expand Up @@ -115,8 +117,8 @@ data object NetworkModule {
tokenEndpoint = "token"
}
}
clientId = instance<String>(Constants.Sekret.ANILIST_CLIENT_ID).ifBlank { null }
clientSecret = instance<String>(Constants.Sekret.ANILIST_CLIENT_SECRET).ifBlank { null }
clientId = Sekret.anilistClientId(BuildKonfig.packageName)
clientSecret = Sekret.anilistClientSecret(BuildKonfig.packageName)
redirectUri = Constants.AniList.Auth.REDIRECT_URL
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,4 @@ data object Constants {
const val CLIENT = "AniListAuthClient"
}
}

data object Sekret {
const val ANILIST_CLIENT_ID = "AniListClientId"
const val ANILIST_CLIENT_SECRET = "AniListClientSecret"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,15 @@ actual object PlatformModule {
}
bindSingleton<FirebaseFactory> {
FirebaseFactory.initialize(
projectId = firebaseProject(BuildKonfig.packageName),
applicationId = firebaseIosApplication(BuildKonfig.packageName),
apiKey = firebaseIosApiKey(BuildKonfig.packageName),
projectId = Sekret.firebaseProject(BuildKonfig.packageName),
applicationId = Sekret.firebaseIosApplication(BuildKonfig.packageName)!!,
apiKey = Sekret.firebaseIosApiKey(BuildKonfig.packageName)!!,
googleAuthProvider = instanceOrNull()
)
}
bindEagerSingleton<IosCodeAuthFlowFactory> {
IosCodeAuthFlowFactory()
}
bindSingleton(Constants.Sekret.ANILIST_CLIENT_ID) {
anilistClientId(BuildKonfig.packageName)
}
bindSingleton(Constants.Sekret.ANILIST_CLIENT_SECRET) {
anilistClientSecret(BuildKonfig.packageName)
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ moko-resources = "0.24.0-alpha-5"
multidex = "2.0.1"
napier = "2.7.1"
oidc = "0.9.1"
sekret = "2.0.0-alpha-01"
sekret = "2.0.0-alpha-04"
serialization = "1.6.3"
splashscreen = "1.0.1"
tooling = "1.3.2"
Expand Down

0 comments on commit 0efba8b

Please sign in to comment.