Skip to content

Commit

Permalink
Fixed TV release build (#1420)
Browse files Browse the repository at this point in the history
  • Loading branch information
pflammertsma authored Jun 28, 2024
2 parents e0b7c30 + 8eb61f0 commit 4cb7b61
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
14 changes: 14 additions & 0 deletions Jetcaster/tv/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,24 @@ android {
}

}
signingConfigs {
// Important: change the keystore for a production deployment
val userKeystore = File(System.getProperty("user.home"), ".android/debug.keystore")
val localKeystore = rootProject.file("debug_2.keystore")
val hasKeyInfo = userKeystore.exists()
create("release") {
// get from env variables
storeFile = if (hasKeyInfo) userKeystore else localKeystore
storePassword = if (hasKeyInfo) "android" else System.getenv("compose_store_password")
keyAlias = if (hasKeyInfo) "androiddebugkey" else System.getenv("compose_key_alias")
keyPassword = if (hasKeyInfo) "android" else System.getenv("compose_key_password")
}
}

buildTypes {
getByName("release") {
isMinifyEnabled = true
signingConfig = signingConfigs.getByName("release")
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
Expand Down
8 changes: 5 additions & 3 deletions Jetcaster/tv/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@

# Rome reflectively loads classes referenced in com/rometools/rome/rome.properties.
-adaptresourcefilecontents com/rometools/rome/rome.properties
-keep,allowobfuscation class * implements com.rometools.rome.feed.synd.Converter
-keep,allowobfuscation class * implements com.rometools.rome.io.ModuleParser
-keep,allowobfuscation class * implements com.rometools.rome.io.WireFeedParser
-keep class * implements com.rometools.rome.feed.synd.Converter
-keep class * implements com.rometools.rome.io.ModuleParser
-keep class * implements com.rometools.rome.io.WireFeedParser

# Disable warnings for missing classes from OkHttp.
-dontwarn org.conscrypt.ConscryptHostnameVerifier
Expand All @@ -48,3 +48,5 @@
-dontwarn org.openjsse.javax.net.ssl.SSLParameters
-dontwarn org.openjsse.javax.net.ssl.SSLSocket
-dontwarn org.openjsse.net.ssl.OpenJSSE

-keep class androidx.compose.ui.platform.AndroidCompositionLocals_androidKt { *; }

0 comments on commit 4cb7b61

Please sign in to comment.