Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

numerous small fixes for current compatibility, otherwise android targets fail to build #966

Merged
merged 3 commits into from
Mar 14, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions another-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ android {

lintOptions {
disable "HardcodedDebugMode"
checkReleaseBuilds false
}
}

Expand Down
3 changes: 3 additions & 0 deletions another-app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
# removes such information by default, so configure it to keep all of it.
-keepattributes Signature

#Required from R8 in newer versions of Gradle
-keepattributes EnclosingMethod

# For using GSON @Expose annotation
-keepattributes *Annotation*

Expand Down
6 changes: 6 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ android {
// If app doesn"t specify dimensions, use missingDimensionStrategy
// https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html#resolve_matching_errors
missingDimensionStrategy "tier", "free", "paid"

lintOptions {
checkReleaseBuilds false
}
}

flavorDimensions "default"
Expand Down Expand Up @@ -42,6 +46,8 @@ android {
release {
buildConfigField "boolean", "CAN_JUMP", "true"
buildConfigField "boolean", "DEBUG_CONFIG", "false"
minifyEnabled true
proguardFiles "proguard-rules.pro"
}
}
}
Expand Down
41 changes: 41 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
##---------------Begin: proguard configuration for Gson ----------
# Gson uses generic type information stored in a class file when working with fields. Proguard
# removes such information by default, so configure it to keep all of it.
-keepattributes Signature

#Required from R8 in newer versions of Gradle
-keepattributes EnclosingMethod

# For using GSON @Expose annotation
-keepattributes *Annotation*

# Gson specific classes
-keep class sun.misc.Unsafe { *; }
#-keep class com.google.gson.stream.** { *; }

# Application classes that will be serialized/deserialized over Gson
-keep class com.google.gson.examples.android.model.** { *; }

# Dagger
-dontwarn java.lang.**
-dontwarn javax.lang.**
-dontwarn javax.annotation.**
-dontwarn javax.tools.**
-dontwarn sun.misc.Unsafe
-dontwarn dagger.shaded.auto.common.BasicAnnotationProcessor

-dontwarn dagger.internal.codegen.**
-keepclassmembers,allowobfuscation class * {
@javax.inject.* *;
@dagger.* *;
<init>();
}
-keep class dagger.* { *; }
-keep class javax.inject.* { *; }
-keep class * extends dagger.internal.Binding
-keep class * extends dagger.internal.ModuleAdapter
-keep class * extends dagger.internal.StaticInjection

# Androidx
-dontwarn androidx.tracing.Trace
-dontwarn androidx.annotation.experimental.**
2 changes: 1 addition & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def exclude = { dep, String... excludes ->
}

def versions = [
androidPlugin : "4.1.0",
androidPlugin : "4.2.2",
androidTools : "27.1.0",
autovalue : "1.7.4",
avro : "1.10.1",
Expand Down
4 changes: 4 additions & 0 deletions kotlin-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ android {
}

flavorDimensions "default"

lintOptions {
checkReleaseBuilds false
}
}

tasks.withType(KotlinCompile).all {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ public String getPath() {
throw new UnsupportedOperationException();
}

@Override
public String getProjectName() {
throw new UnsupportedOperationException();
}

@Override
public String getVariantName() {
throw new UnsupportedOperationException();
Expand Down