-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.gradle
67 lines (56 loc) · 1.66 KB
/
build.gradle
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
adapterVersion = '7.5.0'
// Dependencies
airshipVersion = '16.7.2'
gimbalVersion = '4.8.0'
// Android SDK versions
compileSdkVersion = 32
targetSdkVersion = 32
minSdkVersion = 21
// Gradle plugins
gradlePluginVersion = '7.3.0'
nexusPublishPluginVersion = '1.1.0'
}
repositories {
google()
gradlePluginPortal()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:$gradlePluginVersion"
}
}
plugins {
id 'io.github.gradle-nexus.publish-plugin' version "$nexusPublishPluginVersion"
}
allprojects {
repositories {
google()
mavenCentral()
}
}
task getVersion() {
doLast {
println adapterVersion
}
}
nexusPublishing {
// user and pass are required for publishing.
def user = System.getenv("SONATYPE_USERNAME") ?: findProperty("sonatype.username")
def pass = System.getenv("SONATYPE_PASSWORD") ?: findProperty("sonatype.password")
// profileId is optional, but supposedly speeds things up if set.
def profileId = System.getenv("SONATYPE_STAGING_PROFILE_ID") ?: findProperty("sonatype.stagingProfileId")
if (user != null && pass != null) {
repositories {
sonatype {
username.set(user)
password.set(pass)
stagingProfileId.set(profileId)
}
}
} else {
logger.info("Missing publishing credentials! Nexus publishing will not be configured.")
}
}