-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathbuild.gradle
More file actions
49 lines (42 loc) · 1.27 KB
/
build.gradle
File metadata and controls
49 lines (42 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
buildscript {
repositories {
google()
gradlePluginPortal()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:7.1.3"
classpath 'com.github.kezong:fat-aar:1.3.8'
}
}
plugins {
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
}
group = GROUP
version = VERSION_NAME
def getReleaseRepositoryUrl() {
return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL
: "https://ossrh-staging-api.central.sonatype.com/service/local/"
}
def getProjectSnapshotRepositoryUrl() {
return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL
: "https://central.sonatype.com/repository/maven-snapshots/"
}
def getRepositoryUsername() {
return hasProperty('nexusUsername') ? nexusUsername : ""
}
def getRepositoryPassword() {
return hasProperty('nexusPassword') ? nexusPassword : ""
}
nexusPublishing {
packageGroup = GROUP
repositories {
maven {
nexusUrl.set(uri(getReleaseRepositoryUrl()))
snapshotRepositoryUrl.set(uri(getProjectSnapshotRepositoryUrl()))
username = getRepositoryUsername()
password = getRepositoryPassword()
stagingProfileId = STAGING_PROFILE_ID
}
}
}