-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbuild.gradle
131 lines (107 loc) · 3.34 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
buildscript {
// Username & password for Sonatype, stored in gradle.properties
final def _OSSRH_USERNAME = System.getenv('NEXUS_USERNAME')
final def _OSSRH_PASSWORD = System.getenv('NEXUS_PASSWORD')
// Artifact settings
final def _IS_RELEASE_VERSION = !VERSION_NAME.endsWith("SNAPSHOT")
ext {
ossrhUsername = _OSSRH_USERNAME
ossrhPassword = _OSSRH_PASSWORD
getPublishRepositoryUrl = {
return _IS_RELEASE_VERSION ? RELEASE_REPO_URL : SNAPSHOT_REPO_URL
}
isSigningRequired = {
return _IS_RELEASE_VERSION
}
//If the Gradle plugin version is X.Y.Z, then the Lint library version is X+23.Y.Z.
lintVersion = '26.4.0'
gradlePluginVersion = '3.4.0'
kotlinx_version = '1.3.1'
kotlin_version = '1.3.60'
dokkaVersion = '0.9.17'
}
repositories {
google()
jcenter()
mavenCentral()
mavenLocal()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "dk.nodes.nstack:translation:3.2.1-beta5"
classpath 'dk.nodes.ci:bitrise:1.1'
classpath "org.jetbrains.dokka:dokka-android-gradle-plugin:$dokkaVersion"
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.21.1"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.1.0"
classpath 'digital.wup:android-maven-publish:3.6.2'
}
}
plugins {
id "com.diffplug.gradle.spotless" version "3.23.1"
id "io.codearte.nexus-staging" version "0.21.0"
}
allprojects {
if (JavaVersion.current().isJava8Compatible()) {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
ext."signing.keyId" = System.getenv('keyId')
ext."signing.secretKeyRingFile" = System.getenv('secretKeyRingFile')
ext."signing.password" = System.getenv('password')
repositories {
google()
jcenter()
mavenCentral()
mavenLocal()
maven { url "https://jitpack.io" }
}
}
subprojects {
group = GROUP
version = VERSION_NAME
apply plugin: 'org.jetbrains.dokka'
apply plugin: 'com.diffplug.gradle.spotless'
dokka {
reportUndocumented = false
outputFormat = 'html'
outputDirectory = "$buildDir/javadoc"
}
spotless {
kotlin {
target "**/*.kt"
ktlint('0.33.0')
}
java {
target "**/*.java"
targetExclude '**/Translation.java'
googleJavaFormat('1.1').aosp()
}
format 'groovy', {
target '**/*.groovy'
indentWithTabs()
indentWithSpaces(4)
endWithNewline()
}
format 'misc', {
target '**/*.gradle'
trimTrailingWhitespace()
indentWithSpaces(4)
endWithNewline()
}
}
}
static def getRepositoryUsername() {
return System.getenv('NEXUS_USERNAME')
}
static def getRepositoryPassword() {
return System.getenv('NEXUS_PASSWORD')
}
nexusStaging {
packageGroup = "dk.nodes"
stagingProfileId = "5a414403b5bf75"
username = getRepositoryUsername()
password = getRepositoryPassword()
delayBetweenRetriesInMillis = 30000
}