-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
91 lines (76 loc) · 2.47 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
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.3.60'
id 'io.vertx.vertx-plugin' version '1.4.0'
id 'com.github.breadmoirai.github-release' version '2.2.10'
}
def timestampFormat = new java.text.SimpleDateFormat('yyyyMMdd.HHmmss')
timestampFormat.timeZone = TimeZone.getTimeZone("UTC")
Date buildTime = new Date()
ext.releaseProp = hasProperty("release") ? getProperty("release") : false
ext.vertxVersion = hasProperty("vertxVersion") ? getProperty("vertxVersion"): "4.1.8"
ext.jacksonDatabindVersion = findProperty("jacksonDatabindVersion") ?: '2.15.3'
ext.loggingVersion = findProperty("loggingVersion") ?: "1.10.11"
ext.logbackVersion = findProperty("logbackVersion") ?: "1.2.6"
ext {
buildTimestamp = timestampFormat.format(buildTime)
baseVersion = '1.3.1'
}
def computedVersion = baseVersion + '-' + buildTimestamp
if (releaseProp.toBoolean()) {
computedVersion = baseVersion
}
group 'com.incquerylabs'
version computedVersion
repositories {
mavenCentral()
}
dependencies {
compile 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
compile "io.vertx:vertx-web:$vertxVersion"
compile "io.vertx:vertx-web-client:$vertxVersion"
compile "io.github.microutils:kotlin-logging:$loggingVersion"
runtimeOnly "ch.qos.logback:logback-classic:$logbackVersion"
api group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: jacksonDatabindVersion
}
compileKotlin {
kotlinOptions.jvmTarget = '1.8'
}
compileTestKotlin {
kotlinOptions.jvmTarget = '1.8'
}
application {
mainClassName = 'com.incquerylabs.twc.repo.crawler.CrawlerKt'
}
vertx {
launcher = 'com.incquerylabs.twc.repo.crawler.CrawlerKt'
}
task deleteGithubReleasePack(type: Delete) {
delete "$buildDir/github-release"
}
task collectGithubRelease(type: Copy) {
into "$buildDir/github-release"
from("$buildDir/libs") {
include "*.jar"
}
from("$buildDir/distributions") {
include "*.zip"
}
dependsOn build
dependsOn deleteGithubReleasePack
}
def githubToken = hasProperty('githubToken') ? getProperty('githubToken') : "token"
githubRelease {
token githubToken
owner "IncQueryLabs"
repo "repo-crawler"
// tagName "v1.0.0" // by default this is set to "v${project.version}"
releaseName "Repository Crawler for Teamwork Cloud v$version"
body "TODO"
draft true
releaseAssets new File("$buildDir/github-release").listFiles()
overwrite true
}
wrapper {
distributionType = 'all'
gradleVersion = '7.4.2'
}