-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
107 lines (86 loc) · 2.45 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
buildscript {
ext {
akka_version = "2.6+"
akka_http_version = "10.2.10"
jackson_version = "2.13.1"
}
}
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.6.10'
id 'maven-publish'
}
version '1.1.2'
repositories {
jcenter()
mavenCentral()
}
compileKotlin {
kotlinOptions.jvmTarget = '11'
}
compileTestKotlin {
kotlinOptions.jvmTarget = '11'
}
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
// jackson
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:$jackson_version"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:$jackson_version"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
// akka
implementation "com.typesafe.akka:akka-stream_2.13:$akka_version"
implementation "com.typesafe.akka:akka-http_2.13:$akka_http_version"
implementation "com.typesafe.akka:akka-http-jackson_2.13:$akka_http_version"
// test
testImplementation 'org.junit.jupiter:junit-jupiter:5.6.+'
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
}
task sourceJar(type: Jar, dependsOn: classes) {
classifier 'sources'
from sourceSets.main.kotlin
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier 'javadoc'
from javadoc.destinationDir
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
groupId 'io.coinmetrics'
artifactId 'akka-utils'
version version
pom {
name = 'Kotlin Akka Library'
description = 'Useful utility classes'
}
artifact sourceJar {
classifier 'sources'
}
artifact javadocJar {
classifier 'javadoc'
}
}
}
repositories {
maven {
url "https://gitlab.com/api/v4/projects/31574851/packages/maven"
credentials(HttpHeaderCredentials) {
if (System.env["CI_JOB_TOKEN"] != null) {
name = "Job-Token"
value = System.env["CI_JOB_TOKEN"]
} else {
name = "Private-Token"
value = gitlabPersonalAccessToken
}
}
authentication {
header(HttpHeaderAuthentication)
}
}
}
}