Skip to content

Commit

Permalink
[android] Add publish url
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-efremov committed Jan 26, 2023
1 parent c2e4fcf commit 46a37c9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
13 changes: 13 additions & 0 deletions X2tConverter/build/Android/extras/gradle/common.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
def getKeystore() {
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('Onlyoffice-keystore.properties')
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
return keystoreProperties
}

/*
* Export functions for project visibility
* */
ext {
getKeystore = this.&getKeystore
}
10 changes: 8 additions & 2 deletions X2tConverter/build/Android/libx2t/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ plugins {
id("maven-publish")
}

apply {
from("../extras/gradle/common.gradle")
}

val keystore = extra.get("getKeystore") as org.codehaus.groovy.runtime.MethodClosure

publishing {
publications {
create<MavenPublication>("maven") {
Expand All @@ -20,8 +26,8 @@ publishing {
name = "GitHubPackages"
url = uri("${PublishEditors.publishUrl}/")
credentials {
// username = ""
// password = ""
username = (keystore() as? java.util.Properties)?.getProperty("git_user_name") ?: ""
password = (keystore() as? java.util.Properties)?.getProperty("git_token") ?: ""
}
}
}
Expand Down

0 comments on commit 46a37c9

Please sign in to comment.