-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
103 lines (88 loc) · 2.65 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
}
plugins {
id "com.github.johnrengelman.shadow" version "6.1.0"
id 'com.github.ben-manes.versions' version '0.36.0'
id "com.jfrog.bintray" version "1.8.5" apply false
id "org.sonarqube" version "3.0"
id "io.gitlab.arturbosch.detekt" version "1.14.2"
}
repositories {
jcenter()
}
dependencies {
detektPlugins "io.gitlab.arturbosch.detekt:detekt-formatting:$detektVersion"
}
detekt {
input = files(rootProject.rootDir)
buildUponDefaultConfig = true
failFast = true
baseline = file("$rootDir/baseline.xml")
}
allprojects {
group 'io.gitlab.arturbosch'
version kshVersion
}
subprojects {
apply plugin: 'kotlin'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven-publish'
repositories {
mavenCentral()
mavenLocal()
maven { url "http://dl.bintray.com/arturbosch/generic" }
}
dependencies {
compileOnly "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
testImplementation "junit:junit:$junitVersion"
testImplementation "com.willowtreeapps.assertk:assertk:$assertkVersion"
testImplementation "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"
testImplementation "org.jetbrains.kotlin:kotlin-test:$kotlinVersion"
testImplementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.freeCompilerArgs = ["-Xjvm-default=enable"]
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.freeCompilerArgs = ["-Xjvm-default=enable"]
}
bintray {
user = System.getenv("BINTRAY_USER") ?: ""
key = System.getenv("BINTRAY_API_KEY") ?: ""
publications = ["ksh"]
pkg {
repo = 'generic'
name = 'ksh'
userOrg = 'arturbosch'
licenses = ['Apache-2.0']
vcsUrl = "https://github.com/arturbosch/ksh"
version {
name = project.version
released = new Date()
}
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
getArchiveClassifier().set('sources')
from sourceSets.main.allSource
}
publishing {
publications {
ksh(MavenPublication) {
artifact sourcesJar
from components.java
groupId project.group
artifactId project.name
version project.version
}
}
}
}