forked from SpaiR/repoXbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
90 lines (72 loc) · 2 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
plugins {
id 'application'
id 'com.github.johnrengelman.shadow' version '4.0.2'
id 'org.jetbrains.kotlin.jvm' version '1.3.0'
id 'com.gradle.build-scan' version '1.16'
}
wrapper {
gradleVersion = '4.10.2'
}
buildScan {
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
termsOfServiceAgree = 'yes'
publishAlwaysIf(System.getenv('CI') != null)
}
configurations {
ktlint
}
ext {
kotlinVersion = '1.3.0'
vertxVersion = '3.5.4'
jsoupVersion = '1.11.3'
junitVersion = '5.3.1'
ktlintVersion = '0.29.0'
}
repositories {
jcenter()
mavenLocal()
}
group = 'io.github.spair.repoxbot'
version = '1.0.2-SNAPSHOT'
sourceCompatibility = '1.8'
mainClassName = 'io.vertx.core.Launcher'
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
implementation "io.vertx:vertx-core:$vertxVersion"
implementation "org.jsoup:jsoup:$jsoupVersion"
testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junitVersion"
ktlint "com.github.shyiko:ktlint:$ktlintVersion"
}
compileKotlin {
kotlinOptions {
jvmTarget = sourceCompatibility
}
}
shadowJar {
archiveName = "${rootProject.name}-fat.jar"
manifest {
attributes(
'Main-Verticle': 'io.github.spair.repoxbot.MainVerticle',
'Build-Version': version
)
}
mergeServiceFiles {
include 'META-INF/services/io.vertx.core.spi.VerticleFactory'
}
}
task cleanProject(type: Delete, group: 'build') {
description = 'Deletes the build directory and project generated files.'
dependsOn clean
delete "$projectDir/.vertx", "$projectDir/logs", "$projectDir/out"
}
test {
useJUnitPlatform()
}
task ktlint(type: JavaExec, group: 'verification') {
description = 'Check Kotlin code style.'
main = 'com.github.shyiko.ktlint.Main'
classpath = configurations.ktlint
args ['src/**/*.kt']
}
check.dependsOn ktlint