Skip to content

Commit

Permalink
More fixi
Browse files Browse the repository at this point in the history
  • Loading branch information
erikeelde committed Sep 30, 2023
1 parent b46b013 commit 3f98363
Show file tree
Hide file tree
Showing 16 changed files with 49 additions and 24 deletions.
1 change: 1 addition & 0 deletions build-logic/conventions/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dependencies {
implementation(libs.io.gitlab.arturbosch.detekt.detekt.gradle.plugin)
implementation(libs.com.android.tools.build.gradle)
implementation(libs.org.jetbrains.kotlin.kotlin.gradle.plugin)
implementation("com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:1.9.10-1.0.13")

// https://github.com/gradle/gradle/issues/15383
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
Expand Down
3 changes: 1 addition & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ plugins {
// https://github.com/Kotlin/KEEP/blob/master/proposals/explicit-api-mode.md
alias(libs.plugins.com.github.triplet.play) apply (false)
id("toggles.ownership-conventions")
alias(libs.plugins.com.android.library) apply false
alias(libs.plugins.org.jetbrains.kotlin.android) apply false
id("com.google.devtools.ksp") version "1.9.10-1.0.13" apply false
}

fun isNonStable(version: String): Boolean {
Expand Down
8 changes: 4 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ androidx-room = "2.6.0-alpha03"
androidx-savedstate = "1.2.1"
androidx-test = "1.5.0"
androidx-vectordrawable = "1.1.0"
com-google-dagger = "2.47"
com-google-dagger = "2.48"
com-squareup-leakcanary = "2.8.1"
com-squareup-moshi = "1.15.0"
dokka = "1.8.20"
kotlin = "1.9.10"
org-jetbrains-kotlinx = "1.7.1"
org-jetbrains-kotlinx = "1.7.3"
agp = "8.1.2"
org-jetbrains-kotlin-android = "1.9.0"
junit = "4.13.2"
Expand Down Expand Up @@ -195,11 +195,11 @@ material = { group = "com.google.android.material", name = "material", version.r
com-github-ben-manes-versions = "com.github.ben-manes.versions:0.47.0"
com-github-triplet-play = "com.github.triplet.play:3.8.4"
com-gladed-androidgitversion = "com.gladed.androidgitversion:0.4.14"
com-google-dagger-hilt-android = "com.google.dagger.hilt.android:2.47"
com-google-dagger-hilt-android = { id = "com.google.dagger.hilt.android", version.ref = "com-google-dagger" }
com-google-firebase-crashlytics = "com.google.firebase.crashlytics:2.9.8"
com-google-gms-google-services = "com.google.gms.google-services:4.3.15"
com-vanniktech-maven-publish = "com.vanniktech.maven.publish:0.25.3"
dagger-hilt-android-plugin = "dagger.hilt.android.plugin:2.47"
dagger-hilt-android-plugin = { id = "dagger.hilt.android.plugin:2.48", version.ref = "com-google-dagger" }
nl-littlerobots-version-catalog-update = "nl.littlerobots.version-catalog-update:0.8.1"
org-jetbrains-dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
org-jetbrains-kotlinx-binary-compatibility-validator = "org.jetbrains.kotlinx.binary-compatibility-validator:0.13.2"
Expand Down
3 changes: 2 additions & 1 deletion modules/applications/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id("toggles.android.module-conventions")
id("toggles.ownership-conventions")
id("com.google.devtools.ksp")
}

android {
Expand All @@ -27,5 +28,5 @@ dependencies {
implementation(libs.androidx.compose.ui.ui.tooling.preview)
implementation(libs.androidx.startup.startup.runtime)
implementation(libs.com.google.dagger.hilt.android)
kapt(libs.com.google.dagger.hilt.compiler)
ksp(libs.com.google.dagger.hilt.compiler)
}
3 changes: 2 additions & 1 deletion modules/booleanconfiguration/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id("toggles.android.module-conventions")
id("toggles.ownership-conventions")
id("com.google.devtools.ksp")
}

android {
Expand Down Expand Up @@ -29,5 +30,5 @@ dependencies {
implementation(libs.androidx.startup.startup.runtime)
implementation(libs.com.google.dagger.hilt.android)
implementation(libs.se.eelde.toggles.toggles.core)
kapt(libs.com.google.dagger.hilt.compiler)
ksp(libs.com.google.dagger.hilt.compiler)
}
3 changes: 2 additions & 1 deletion modules/configurations/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id("toggles.android.module-conventions")
id("toggles.ownership-conventions")
id("com.google.devtools.ksp")
}

android {
Expand Down Expand Up @@ -30,5 +31,5 @@ dependencies {
implementation(libs.androidx.compose.ui.ui.tooling.preview)
implementation(libs.androidx.startup.startup.runtime)
implementation(libs.com.google.dagger.hilt.android)
kapt(libs.com.google.dagger.hilt.compiler)
ksp(libs.com.google.dagger.hilt.compiler)
}
3 changes: 2 additions & 1 deletion modules/database/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id("toggles.android.module-conventions")
id("toggles.ownership-conventions")
id("com.google.devtools.ksp")
}

class RoomSchemaArgProvider(
Expand Down Expand Up @@ -43,7 +44,7 @@ dependencies {
implementation(libs.androidx.room.room.paging)
implementation(libs.androidx.room.room.runtime)
implementation(libs.androidx.room.room.ktx)
kapt(libs.androidx.room.room.compiler)
ksp(libs.androidx.room.room.compiler)
implementation(libs.se.eelde.toggles.toggles.core)
implementation(libs.androidx.core.core.ktx)
implementation(libs.androidx.appcompat)
Expand Down
3 changes: 2 additions & 1 deletion modules/enumconfiguration/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id("toggles.android.module-conventions")
id("toggles.ownership-conventions")
id("com.google.devtools.ksp")
}

android {
Expand Down Expand Up @@ -29,5 +30,5 @@ dependencies {
implementation(libs.androidx.startup.startup.runtime)
implementation(libs.com.google.dagger.hilt.android)
implementation(libs.se.eelde.toggles.toggles.core)
kapt(libs.com.google.dagger.hilt.compiler)
ksp(libs.com.google.dagger.hilt.compiler)
}
3 changes: 2 additions & 1 deletion modules/help/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id("toggles.android.module-conventions")
id("toggles.ownership-conventions")
id("com.google.devtools.ksp")
}

android {
Expand All @@ -26,5 +27,5 @@ dependencies {
implementation(libs.androidx.compose.ui.ui.tooling.preview)
implementation(libs.androidx.startup.startup.runtime)
implementation(libs.com.google.dagger.hilt.android)
kapt(libs.com.google.dagger.hilt.compiler)
ksp(libs.com.google.dagger.hilt.compiler)
}
3 changes: 2 additions & 1 deletion modules/integerconfiguration/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id("toggles.android.module-conventions")
id("toggles.ownership-conventions")
id("com.google.devtools.ksp")
}

android {
Expand Down Expand Up @@ -29,5 +30,5 @@ dependencies {
implementation(libs.androidx.startup.startup.runtime)
implementation(libs.com.google.dagger.hilt.android)
implementation(libs.se.eelde.toggles.toggles.core)
kapt(libs.com.google.dagger.hilt.compiler)
ksp(libs.com.google.dagger.hilt.compiler)
}
3 changes: 2 additions & 1 deletion modules/provider/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id("toggles.android.module-conventions")
id("toggles.ownership-conventions")
id("com.google.devtools.ksp")
}

android {
Expand Down Expand Up @@ -30,5 +31,5 @@ dependencies {
implementation(libs.androidx.compose.ui.ui.tooling.preview)
implementation(libs.androidx.startup.startup.runtime)
implementation(libs.com.google.dagger.hilt.android)
kapt(libs.com.google.dagger.hilt.compiler)
ksp(libs.com.google.dagger.hilt.compiler)
}
3 changes: 2 additions & 1 deletion modules/stringconfiguration/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id("toggles.android.module-conventions")
id("toggles.ownership-conventions")
id("com.google.devtools.ksp")
}

android {
Expand Down Expand Up @@ -29,5 +30,5 @@ dependencies {
implementation(libs.androidx.startup.startup.runtime)
implementation(libs.com.google.dagger.hilt.android)
implementation(libs.se.eelde.toggles.toggles.core)
kapt(libs.com.google.dagger.hilt.compiler)
ksp(libs.com.google.dagger.hilt.compiler)
}
9 changes: 5 additions & 4 deletions toggles-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ plugins {
id("com.google.firebase.crashlytics")
id("app.cash.licensee")
id("se.premex.gross") version "0.1.0"
id("com.google.devtools.ksp")
}

val versionFile = File("versions.properties")
Expand Down Expand Up @@ -143,16 +144,16 @@ dependencies {
implementation(libs.com.google.firebase.firebase.analytics.ktx)

implementation(libs.com.google.dagger.hilt.android)
kapt(libs.com.google.dagger.hilt.android.compiler)
kapt(libs.androidx.hilt.hilt.compiler)
ksp(libs.com.google.dagger.hilt.android.compiler)
ksp(libs.androidx.hilt.hilt.compiler)

testImplementation(libs.com.google.dagger.hilt.android.testing)
kaptTest(libs.com.google.dagger.hilt.android.compiler)
kspTest(libs.com.google.dagger.hilt.android.compiler)

implementation(libs.androidx.lifecycle.lifecycle.common.java8)

implementation(libs.com.google.dagger)
kapt(libs.com.google.dagger.dagger.compiler)
ksp(libs.com.google.dagger.dagger.compiler)

implementation(libs.androidx.appcompat)
implementation(libs.androidx.recyclerview)
Expand Down
16 changes: 16 additions & 0 deletions toggles-core/api/toggles-core.api
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public final class se/eelde/toggles/core/ColumnNames$ToggleValue {
public final class se/eelde/toggles/core/Toggle {
public static final field Companion Lse/eelde/toggles/core/Toggle$Companion;
public synthetic fun <init> (JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun copy (JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lse/eelde/toggles/core/Toggle;
public static synthetic fun copy$default (Lse/eelde/toggles/core/Toggle;JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lse/eelde/toggles/core/Toggle;
public fun equals (Ljava/lang/Object;)Z
public static final fun fromContentValues (Landroid/content/ContentValues;)Lse/eelde/toggles/core/Toggle;
public static final fun fromCursor (Landroid/database/Cursor;)Lse/eelde/toggles/core/Toggle;
Expand All @@ -36,10 +38,18 @@ public final class se/eelde/toggles/core/Toggle {
public final class se/eelde/toggles/core/Toggle$Builder {
public fun <init> ()V
public final fun build ()Lse/eelde/toggles/core/Toggle;
public final fun getId ()J
public final fun getKey ()Ljava/lang/String;
public final fun getType ()Ljava/lang/String;
public final fun getValue ()Ljava/lang/String;
public final fun setId (J)Lse/eelde/toggles/core/Toggle$Builder;
public final synthetic fun setId (J)V
public final fun setKey (Ljava/lang/String;)Lse/eelde/toggles/core/Toggle$Builder;
public final synthetic fun setKey (Ljava/lang/String;)V
public final fun setType (Ljava/lang/String;)Lse/eelde/toggles/core/Toggle$Builder;
public final synthetic fun setType (Ljava/lang/String;)V
public final fun setValue (Ljava/lang/String;)Lse/eelde/toggles/core/Toggle$Builder;
public final synthetic fun setValue (Ljava/lang/String;)V
}

public final class se/eelde/toggles/core/Toggle$Companion {
Expand Down Expand Up @@ -72,9 +82,15 @@ public final class se/eelde/toggles/core/ToggleValue {
public final class se/eelde/toggles/core/ToggleValue$Builder {
public fun <init> ()V
public final fun build ()Lse/eelde/toggles/core/ToggleValue;
public final fun getConfigurationId ()J
public final fun getId ()J
public final fun getValue ()Ljava/lang/String;
public final fun setConfigurationId (J)Lse/eelde/toggles/core/ToggleValue$Builder;
public final synthetic fun setConfigurationId (J)V
public final fun setId (J)Lse/eelde/toggles/core/ToggleValue$Builder;
public final synthetic fun setId (J)V
public final fun setValue (Ljava/lang/String;)Lse/eelde/toggles/core/ToggleValue$Builder;
public final synthetic fun setValue (Ljava/lang/String;)V
}

public final class se/eelde/toggles/core/TogglesProviderContract {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package se.eelde.toggles.prefs

@Suppress("LibraryEntitiesShouldNotBePublic")
public interface TogglesPreferences {
fun getBoolean(key: String, defValue: Boolean): Boolean
fun getInt(key: String, defValue: Int): Int
fun getString(key: String, defValue: String): String
fun <T : Enum<T>> getEnum(key: String, type: Class<T>, defValue: T): T
public fun getBoolean(key: String, defValue: Boolean): Boolean
public fun getInt(key: String, defValue: Int): Int
public fun getString(key: String, defValue: String): String
public fun <T : Enum<T>> getEnum(key: String, type: Class<T>, defValue: T): T
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ public class TogglesPreferencesImpl(context: Context) : TogglesPreferences {
private val context = context.applicationContext
private val contentResolver: ContentResolver = this.context.contentResolver


override fun getBoolean(key: String, defValue: Boolean): Boolean {
var toggle = getToggle(
contentResolver = contentResolver,
Expand Down

0 comments on commit 3f98363

Please sign in to comment.