-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
82 lines (70 loc) · 1.57 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.19.0'
}
}
plugins {
id "org.jetbrains.kotlin.jvm" version "1.5.20"
id "com.diffplug.spotless" version "5.14.0"
}
apply plugin: 'kotlin'
apply plugin: 'kotlin-kapt'
apply from: "dependencies.gradle"
apply plugin: "com.vanniktech.maven.publish"
allprojects {
plugins.withId("com.vanniktech.maven.publish") {
mavenPublish {
sonatypeHost = "S01"
}
}
}
group GROUP
version VERSION_NAME
repositories {
mavenCentral()
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin/'
test.java.srcDirs += 'src/test/kotlin/'
}
spotless {
kotlin {
ktfmt(versions.ktfmt.toString()).dropboxStyle()
}
}
dependencies {
// Kotlin
implementation deps.kotlin.stdlib
implementation deps.kotlin.reflect
// Clikt
implementation deps.clikt
// JDOM
implementation deps.jdom
// Dagger
implementation deps.dagger.dagger
kapt deps.dagger.compiler
}
jar {
manifest {
attributes 'Main-Class': releasing.main_class
}
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
archiveFileName.set(releasing.archive_name.toString())
}
test {
testLogging {
events "passed", "skipped", "failed"
}
}
compileKotlin {
kotlinOptions.jvmTarget = versions.jvm_target
}
compileTestKotlin {
kotlinOptions.jvmTarget = versions.jvm_target
}
rootProject.tasks.named("jar") {
duplicatesStrategy = 'include'
}