Skip to content

Commit

Permalink
prepare for actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve-Mr committed Sep 25, 2024
1 parent ebb3722 commit 2140e75
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
.externalNativeBuild
.cxx
local.properties
key.properties
46 changes: 45 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
import java.io.FileInputStream
import java.util.Properties

plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.jetbrains.kotlin.android)
id("com.google.devtools.ksp")
}

// Create a variable called keystorePropertiesFile, and initialize it to your
// keystore.properties file, in the rootProject folder.
val keystorePropertiesFile = rootProject.file("key.properties")

// Initialize a new Properties() object called keystoreProperties.
val keystoreProperties = Properties()

// Load your keystore.properties file into the keystoreProperties object.
keystoreProperties.load(FileInputStream(keystorePropertiesFile))

android {
namespace = "top.maary.oblivionis"
compileSdk = 34
Expand All @@ -21,6 +34,15 @@ android {
}
}

signingConfigs {
create("config") {
keyAlias = keystoreProperties["keyAlias"] as String
keyPassword = keystoreProperties["keyPassword"] as String
storeFile = file(keystoreProperties["storeFile"] as String)
storePassword = keystoreProperties["storePassword"] as String
}
}

buildTypes {
release {
isMinifyEnabled = true
Expand All @@ -29,9 +51,10 @@ android {
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
signingConfig = signingConfigs.getByName("debug")
signingConfig = signingConfigs.getByName("config")
}
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
Expand All @@ -50,6 +73,27 @@ android {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
splits {

// Configures multiple APKs based on ABI.
abi {

// Enables building multiple APKs per ABI.
isEnable = true

// By default all ABIs are included, so use reset() and include to specify that you only
// want APKs for x86 and x86_64.

// Resets the list of ABIs for Gradle to create APKs for to none.
reset()

// Specifies a list of ABIs for Gradle to create APKs for.
include("x86", "x86_64", "armeabi-v7a", "arm64-v8a")

// Specifies that you don't want to also generate a universal APK that includes all ABIs.
isUniversalApk = false
}
}
}

dependencies {
Expand Down

0 comments on commit 2140e75

Please sign in to comment.