Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions main.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -153,18 +153,17 @@ subprojects {
}
}

def validation = project.hasProperty('signing.keyId');
logger.lifecycle("=== VALIDATIONNNNNNN [${validation}] ===")

if (project.hasProperty('signing.keyId')) {
signing {
def keyId = project.findProperty("signing.keyId")
def secretKey = project.findProperty("signing.key")
def password = project.findProperty("signing.password")
def signingKeyId = System.getenv("SIGNING_KEY_ID") ?: project.findProperty("signing.keyId")
def signingKey = System.getenv("SIGNING_KEY_FILE") ?: project.findProperty("signing.key")
def signingPassword = System.getenv("SIGNING_PASSWORD") ?: project.findProperty("signing.password")

useInMemoryPgpKeys(keyId, secretKey, password)
if (signingKeyId && signingKey && signingPassword) {
signing {
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
sign publishing.publications.mavenJava
}
} else {
logger.lifecycle("Firma omitida: No se encontraron las variables de entorno o propiedades necesarias.")
}
}

Expand Down