Separate app info, added flavors

This commit is contained in:
Adolfo Santiago 2022-02-19 07:35:32 +01:00
parent 840d7ec838
commit b3bd29a8a2
No known key found for this signature in database
GPG key ID: 244D6F9A317B4A65
5 changed files with 98 additions and 26 deletions

View file

@ -54,22 +54,50 @@ android {
shrinkResources true
zipAlignEnabled true
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
}
}
flavorDimensions "husky", "release"
flavorDimensions buildVersions.flavorDimensions.husky, buildVersions.flavorDimensions.release
productFlavors {
newHusky {
dimension buildVersions.flavorDimensions.release
applicationId buildVersions.newHusky.applicationId
compileSdkVersion buildVersions.newHusky.compileSdk
minSdkVersion buildVersions.newHusky.minSdk
targetSdkVersion buildVersions.newHusky.targetSdk
versionCode buildVersions.newHusky.versionCode
versionName buildVersions.newHusky.versionName
}
husky {
dimension "husky"
dimension buildVersions.flavorDimensions.husky
}
dev {
dimension buildVersions.flavorDimensions.release
applicationId buildVersions.dev.applicationId
minSdkVersion buildVersions.dev.minSdk
targetSdkVersion buildVersions.dev.targetSdk
versionCode buildVersions.dev.versionCode
versionName buildVersions.dev.versionName
}
beta {
dimension "release"
dimension buildVersions.flavorDimensions.release
versionNameSuffix = "-${buildVersions.beta.suffix}${buildVersions.beta.versionSuffix}"
}
stable {
dimension "release"
dimension buildVersions.flavorDimensions.release
}
}
@ -79,12 +107,13 @@ android {
}
kotlinOptions {
jvmTarget = buildVersions.javaCompat.toString()
jvmTarget = buildVersions.jdkVersion
}
androidExtensions {
experimental = true
}
buildFeatures {
viewBinding true
}

60
husky/appinfo.gradle Normal file
View file

@ -0,0 +1,60 @@
def buildVersions = [:]
buildVersions.applicationId = "su.xash.husky"
buildVersions.compileSdk = 30
buildVersions.minSdk = 23
buildVersions.targetSdk = 30
buildVersions.buildTools = "32.0.0"
buildVersions.javaCompat = JavaVersion.VERSION_11
buildVersions.jdkVersion = "${buildVersions.javaCompat}"
buildVersions.encoding = "UTF-8"
buildVersions.versionCode = 175
buildVersions.versionName = "1.1.0"
// Beta version info
def beta = [:]
beta.suffix = "beta"
beta.versionSuffix = "3"
buildVersions.beta = beta
// Dev version info
def dev = [:]
dev.applicationId = "su.xash.husky.dev"
dev.minSdk = 23
dev.targetSdk = 30
dev.versionCode = 1
dev.versionName = "1.0.0"
buildVersions.dev = dev
// Husky refactor info
def newHusky = [:]
newHusky.applicationID = "su.xash.husky.alpha"
newHusky.compileSdk = 30
newHusky.minSdk = 23
newHusky.targetSdk = 30
newHusky.versionCode = 1
newHusky.versionName = "2.0.0"
buildVersions.newHusky = newHusky
// Flavors dimensions
def flavorDimensions = [:]
flavorDimensions.husky = "husky"
flavorDimensions.release = "release"
buildVersions.flavorDimensions = flavorDimensions
// Debug signing info
def debugSign = [:]
debugSign.signingDebug = "debug"
debugSign.keystoreFile = "debug.keystore"
debugSign.keystorePassword = "android"
debugSign.keyAlias = "androiddebugkey"
debugSign.keyPassword = "android"
buildVersions.debugSign = debugSign
ext.buildVersions = buildVersions

View file

@ -1,6 +1,7 @@
apply plugin: "com.github.ben-manes.versions"
buildscript {
apply from: "appinfo.gradle"
apply from: "versions.gradle"
apply from: "dependencies.gradle"

View file

@ -1,8 +1,3 @@
/**
Edit this file to create a Tusky build that is customized for your Fediverse instance.
Note: Publishing a custom build on Google Play may violate the Google Play developer policy (Repetetive Content)
*/
// The app name
ext.APP_NAME = "Husky"

View file

@ -1,20 +1,7 @@
// Kotlin version
ext.kotlin_version = "1.6.10"
def buildVersions = [:]
buildVersions.applicationId = "com.captainepoch.basemvvm"
buildVersions.compileSdk = 30
buildVersions.minSdk = 23
buildVersions.targetSdk = 30
buildVersions.buildTools = "30.0.3"
buildVersions.javaCompat = JavaVersion.VERSION_11
buildVersions.jdkVersion = 11
buildVersions.encoding = "UTF-8"
buildVersions.versionName = "1.0.0"
buildVersions.versionCode = 1
ext.buildVersions = buildVersions
// Dependencies versions
def versions = [:]
def gradle = [:]