Skip to content

Commit f6600bb

Browse files
david-allisonBrayanDSO
authored andcommitted
refactor(architecture): extract vbpd to module
ViewBindingPropertyDelegate Added in 2c696ae Was requested to be moved to a module: https://redirect.github.com/ankidroid/Anki-Android/issues/11116#issuecomment-3432354012 ---- FragmentViewBindings is not yet required in `proguard`, but it will be soon ---- https://github.com/androidbroadcast/ViewBindingPropertyDelegate/ Issue 11116
1 parent 1853426 commit f6600bb

10 files changed

Lines changed: 32 additions & 1 deletion

File tree

AnkiDroid/src/main/java/dev/androidbroadcast/vbpd/README.md renamed to vbpd/README.md

File renamed without changes.

vbpd/build.gradle.kts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ android {
1212
.get()
1313
.toInt()
1414

15+
buildFeatures {
16+
viewBinding = true
17+
}
18+
1519
defaultConfig {
1620
minSdk =
1721
libs.versions.minSdk
@@ -23,7 +27,7 @@ android {
2327

2428
buildTypes {
2529
release {
26-
isMinifyEnabled = false
30+
isMinifyEnabled = true
2731
proguardFiles(
2832
getDefaultProguardFile("proguard-android-optimize.txt"),
2933
"proguard-rules.pro",
@@ -44,4 +48,5 @@ android {
4448
dependencies {
4549
implementation(libs.androidx.core.ktx)
4650
implementation(libs.androidx.appcompat)
51+
implementation(libs.androidx.recyclerview)
4752
}

vbpd/consumer-rules.pro

Whitespace-only changes.

vbpd/proguard-rules.pro

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
22+
23+
-keep class dev.androidbroadcast.vbpd.ViewBindingProperty { *; }
24+
-keep class dev.androidbroadcast.vbpd.ActivityViewBindings { *; }
25+
-keep class dev.androidbroadcast.vbpd.FragmentViewBindings { *; }
26+
-keep class dev.androidbroadcast.vbpd.internal.VbpdUtilsKt { *; }

AnkiDroid/src/main/java/dev/androidbroadcast/vbpd/ActivityViewBindings.kt renamed to vbpd/src/main/java/dev/androidbroadcast/vbpd/ActivityViewBindings.kt

File renamed without changes.

AnkiDroid/src/main/java/dev/androidbroadcast/vbpd/FragmentViewBindings.kt renamed to vbpd/src/main/java/dev/androidbroadcast/vbpd/FragmentViewBindings.kt

File renamed without changes.

AnkiDroid/src/main/java/dev/androidbroadcast/vbpd/ViewBindingProperty.kt renamed to vbpd/src/main/java/dev/androidbroadcast/vbpd/ViewBindingProperty.kt

File renamed without changes.

AnkiDroid/src/main/java/dev/androidbroadcast/vbpd/ViewGroupBindings.kt renamed to vbpd/src/main/java/dev/androidbroadcast/vbpd/ViewGroupBindings.kt

File renamed without changes.

AnkiDroid/src/main/java/dev/androidbroadcast/vbpd/ViewHolderBindings.kt renamed to vbpd/src/main/java/dev/androidbroadcast/vbpd/ViewHolderBindings.kt

File renamed without changes.

AnkiDroid/src/main/java/dev/androidbroadcast/vbpd/internal/VbpdUtils.kt renamed to vbpd/src/main/java/dev/androidbroadcast/vbpd/internal/VbpdUtils.kt

File renamed without changes.

0 commit comments

Comments
 (0)