-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
67 lines (56 loc) · 1.63 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
plugins {
id 'java-gradle-plugin'
id 'org.jetbrains.kotlin.jvm' version '1.3.72'
id 'maven-publish'
id 'com.gradle.plugin-publish' version '0.19.0'
}
pluginBundle {
website = project.POM_URL
vcsUrl = project.POM_SCM_URL
tags = ['build', 'ci', 'cd', 'android', 'deploy']
}
gradlePlugin {
plugins {
voiBuilScriptsPlugin {
id = "$project.GROUP.$project.POM_ARTIFACT_ID"
displayName = project.POM_NAME
description = project.POM_DESCRIPTION
implementationClass = 'buildscripts.VoiBuildScriptsPlugin'
}
}
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
Object getValue(String propertyName, boolean ignoreEmpty = false) {
if (project.hasProperty(propertyName))
return project.property(propertyName)
String envProp = System.getenv(propertyName)
if (envProp != null)
return envProp
if (ignoreEmpty)
return ""
else throw new IllegalStateException("Please make sure you defined $propertyName for this build!")
}
group = 'io.voiapp.android'
version = '0.8.9'
publishing {
repositories {
maven {
credentials {
username = getValue('voi_maven_user')
password = getValue('voi_maven_password')
}
url 'https://maven.pkg.github.com/voiapp/mvn'
}
}
}
repositories {
mavenCentral()
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
testImplementation 'junit:junit:4.12'
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0"
}