This repository was archived by the owner on Mar 16, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
109 lines (85 loc) · 2.81 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
buildscript {
ext.kotlin_version = '1.3.61'
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
classpath("com.github.jengelman.gradle.plugins:shadow:5.2.0")
}
}
plugins {
id "application"
id "org.jetbrains.kotlin.jvm" version "$kotlin_version"
id "com.github.johnrengelman.shadow" version "5.2.0"
id "com.github.ben-manes.versions" version "0.27.0"
id "io.gitlab.arturbosch.detekt" version "1.3.1"
}
apply plugin: 'kotlinx-serialization'
repositories {
jcenter()
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = "1.8"
}
}
dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlin:kotlin-compiler-embeddable")
implementation("org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable")
implementation("org.jetbrains.kotlin:kotlin-script-util")
implementation("org.jetbrains.kotlin:kotlin-script-runtime")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.14.0")
implementation("com.charleskorn.kaml:kaml:0.15.0")
implementation("org.beryx:text-io:3.4.0")
implementation("com.squareup.okhttp3:okhttp:3.14.4")
implementation("net.swiftzer.semver:semver:1.1.1")
implementation("com.github.ajalt:clikt:2.3.0")
implementation("org.eclipse.jgit:org.eclipse.jgit:5.6.0.201912101111-r")
implementation("org.kohsuke:github-api:1.108")
implementation("com.google.auth:google-auth-library-oauth2-http:0.20.0")
implementation("com.google.apis:google-api-services-androidpublisher:v3-rev20200223-1.30.9")
implementation("org.freemarker:freemarker:2.3.29")
implementation("org.slf4j:slf4j-nop:1.7.25")
detektPlugins "io.gitlab.arturbosch.detekt:detekt-formatting:1.3.1"
}
// Build
compileKotlin {
kotlinOptions {
freeCompilerArgs += "-Xuse-experimental=kotlin.Experimental"
}
}
sourceSets {
getByName("main") {
resources.srcDirs("res")
}
}
// Production build
jar {
from(configurations.compile.collect { it.isDirectory() ? it : zipTree(it) })
}
application {
mainClassName = "com.jonaswanke.unicorn.console.MainKt"
}
distributions {
main {
contents {
into('templates') {
from 'templates'
}
}
}
}
task actionShadowJar(type: Jar, dependsOn: shadowJar) {
archiveName = "unicorn-action.jar"
manifest {
attributes["Main-Class"] = "com.jonaswanke.unicorn.action.MainKt"
}
from zipTree(shadowJar.archivePath)
}
// Linting
detekt {
toolVersion = "1.3.1"
config = files("detekt.yml")
ignoreFailures = true
}