Skip to content

Commit

Permalink
[update]: update gradle scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
tofuliu committed Nov 11, 2021
1 parent 944ff01 commit 43d574f
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
6 changes: 3 additions & 3 deletions soter-client-sdk/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.1'
Expand All @@ -10,7 +10,7 @@ buildscript {

allprojects {
repositories {
jcenter()
mavenCentral()
google()
}
}
Expand All @@ -21,7 +21,7 @@ task clean(type: Delete) {

subprojects {
repositories {
jcenter()
mavenCentral()
}

tasks.withType(Javadoc).all {
Expand Down
2 changes: 1 addition & 1 deletion soter-client-sdk/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
#Tue May 09 20:42:37 CST 2017
VERSION_NAME_PREFIX=2.0.9
VERSION_NAME_PREFIX=2.0.10
VERSION_NAME_SUFFIX=
#VERSION_NAME_SUFFIX=-SNAPSHOT
26 changes: 26 additions & 0 deletions soter-client-sdk/gradle/android-artifacts.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,23 @@ group = GROUP
// }
//}

def getReleaseRepositoryUrl() {
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
return properties.getProperty('RELEASE_REPOSITORY_URL')
}

def getRepositoryUsername() {
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
return properties.getProperty('REPOSITORY_USERNAME')
}

def getRepositoryPassword() {
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
return properties.getProperty('REPOSITORY_PASSWORD')
}

task androidJavadocs(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
Expand All @@ -65,6 +82,15 @@ artifacts {

afterEvaluate {
publishing {
repositories {
maven {
url = getReleaseRepositoryUrl()
credentials {
username = getRepositoryUsername()
password = getRepositoryPassword()
}
}
}
publications {
SoterBoots(MavenPublication) {
// Applies the component for the release build variant.
Expand Down

0 comments on commit 43d574f

Please sign in to comment.