Skip to content

Commit

Permalink
Add SC build variants for future release tracks
Browse files Browse the repository at this point in the history
Change-Id: Ia985f42042e8e4844d71f90c6ee152586a9cf3ef
  • Loading branch information
SpiritCroc committed Jan 17, 2024
1 parent a684ea3 commit b1f24da
Show file tree
Hide file tree
Showing 32 changed files with 33 additions and 6 deletions.
17 changes: 16 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,29 @@ val scVersion = 0
android {
// Use a flavor for common things that the upstream config will not override by the build type
flavorDimensions += "package"
flavorDimensions += "sc-variant"
productFlavors {
// Common upstream overrides across all sc variants - only one flavor for this dimension to ensure it's picked up!
create("sc") {
dimension = "package"
applicationId = "chat.schildi.next"
versionCode = 1
versionName = Versions.versionName + ".sc" + scVersion
isDefault = true
}
// SC variants for different release tracks. Cannot do actual release types for those since fdroid build tools always want `release` builds.
create("default") {
dimension = "sc-variant"
applicationId = "chat.schildi.android"
isDefault = true
}
create("beta") {
dimension = "sc-variant"
applicationId = "chat.schildi.next"
}
create("internal") {
dimension = "sc-variant"
applicationId = "chat.schildi.next.internal"
}
}
// Build types to override some more upstream values
buildTypes {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient android:angle="135" android:startColor="#f2e4ae" android:endColor="#e2f0d2"/>
</shape>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient android:angle="45" android:startColor="#06234f" android:endColor="#0D47A1"/>
</shape>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient android:angle="45" android:startColor="#000000" android:endColor="#1A237E"/>
</shape>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions graphics/icon_gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ export_files() {
dpi=48 # 96/2

file="$mydir/ic_launcher_foreground.svg"
base_folder="$mydir/../app/src/scRelease/res/mipmap"
export_files
base_folder="$mydir/../app/src/scDebug/res/mipmap"
export_files
for variant in scBetaDebug scDefaultDebug scInternalRelease scBetaRelease scDefaultRelease; do
base_folder="$mydir/../app/src/$variant/res/mipmap"
export_files
done
file="$mydir/ic_launcher_monochrome.svg"
base_folder="$mydir/../app/src/sc/res/mipmap"
export_files
Expand All @@ -58,7 +58,7 @@ inkscape "$file" --export-filename="$store_icon.tmp.png" --export-area=36:36:180
# Read gradient from actual vector drawable
get_bg_prop() {
local prop="$1"
cat "$mydir/../app/src/scRelease/res/drawable/ic_launcher_background.xml"|grep "$prop"=|sed 's|.*'"$prop"'=\"\([^\"]*\)".*|\1|'
cat "$mydir/../app/src/scDefaultRelease/res/drawable/ic_launcher_background.xml"|grep "$prop"=|sed 's|.*'"$prop"'=\"\([^\"]*\)".*|\1|'
}
bg_angle=`get_bg_prop angle`
bg_startColor=`get_bg_prop startColor`
Expand Down

0 comments on commit b1f24da

Please sign in to comment.