Skip to content

Commit

Permalink
Modify Project.properties extension to receive keystorePropertiesFile…
Browse files Browse the repository at this point in the history
… instead of the name

Signed-off-by: Patryk Miś <[email protected]>
  • Loading branch information
PatrykMis committed Nov 28, 2023
1 parent 95ace42 commit bb44f21
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ android {
if (keystorePropertiesFile.canRead()) {
signingConfigs {
create("release") {
properties(name = "keystore.properties") { properties ->
properties(keystorePropertiesFile) { properties ->
storeFile = rootProject.file(properties.getProperty("storeFile"))
storePassword = properties.getProperty("storePassword")
keyAlias = properties.getProperty("keyAlias")
Expand Down
5 changes: 2 additions & 3 deletions buildSrc/src/main/kotlin/Project.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@

import com.android.build.gradle.internal.dsl.BaseAppModuleExtension
import org.gradle.api.Project
import java.io.File
import java.io.FileInputStream
import java.util.Properties

fun Project.properties(
name: String,
file: File,
onSuccess: (Properties) -> Unit
) {
val file = rootProject.file(name)

if (file.exists()) {
onSuccess(
Properties().apply {
Expand Down

0 comments on commit bb44f21

Please sign in to comment.