This repository has been archived by the owner on Jan 19, 2024. It is now read-only.
forked from cultureamp/kestrel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
154 lines (131 loc) · 4.62 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
buildscript {
ext.kotlin_version = kotlin_version
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath("com.cinnober.gradle:semver-git:2.3.1")
classpath("org.owasp:dependency-check-gradle:6.5.0.1")
}
}
apply plugin: 'kotlin'
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: "org.owasp.dependencycheck"
group group_id
version "$base_version$version_suffix"
archivesBaseName = "kestrel"
sourceCompatibility = project.targetJvmVersion
targetCompatibility = project.targetJvmVersion
sourceSets {
main.kotlin.srcDirs = main.java.srcDirs = ["src/main/kotlin"]
test.kotlin.srcDirs = test.java.srcDirs = ["src/test/java", "src/test/kotlin"]
}
dependencyCheck {
// anything over a 5.0 is above a 'warning'
failBuildOnCVSS = 2.0F
// this is the default, added here for clarity
failOnError = true
// if needed, a supression file can be added
suppressionFile = file("$rootDir/owasp-suppression.xml").toString()
analyzers.assemblyEnabled = false
}
java {
withJavadocJar()
withSourcesJar()
}
publishing {
repositories {
maven {
def releasesUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotsUrl : releasesUrl
credentials {
username = System.getenv('SONATYPE_USERNAME')
password = System.getenv('SONATYPE_PASSWORD')
}
}
}
publications {
mavenJava(MavenPublication) {
artifactId = "kestrel"
from components.java
pom {
name = "Kestrel"
description = "Kotlin Framework for running event-sourced services"
packaging = 'jar'
url = 'https://github.com/cultureamp/kestrel'
scm {
connection = 'scm:[email protected]:cultureamp/kestrel.git'
developerConnection = 'scm:[email protected]:cultureamp/kestrel.git'
url = 'https://github.com/cultureamp/kestrel'
}
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'williamboxhall'
name = 'William Boxhall'
email = '[email protected]'
}
}
}
}
}
}
signing {
def skipSigning = Boolean.valueOf(System.getenv("SKIP_SIGNING"))
if (!skipSigning)
{
useGpgCmd()
sign publishing.publications.mavenJava
}
}
javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
repositories {
mavenCentral()
mavenLocal()
}
test {
useJUnitPlatform()
// show standard out and standard error of the test JVM(s) on the console
testLogging.showStandardStreams = true
testLogging {
events "PASSED", "FAILED", "SKIPPED", "STANDARD_OUT", "STANDARD_ERROR"
}
}
compileKotlin {
kotlinOptions {
freeCompilerArgs = ["-XXLanguage:+InlineClasses"]
jvmTarget = project.targetJvmVersion
}
}
compileTestKotlin {
kotlinOptions.jvmTarget = project.targetJvmVersion
}
dependencies {
api 'io.arrow-kt:arrow-core:1.2.0'
api "joda-time:joda-time:2.12.5"
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.15.2"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:2.15.2"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
implementation "org.jetbrains.exposed:exposed-core:$exposed_version"
implementation "org.jetbrains.exposed:exposed-jdbc:$exposed_version"
implementation "org.jetbrains.exposed:exposed-jodatime:$exposed_version"
implementation "io.github.microutils:kotlin-logging:2.0.11"
testImplementation "io.kotest:kotest-runner-junit5-jvm:5.7.2" // for kotest framework
testImplementation "io.kotest:kotest-assertions-core-jvm:5.7.2" // for kotest core jvm assertions
testImplementation "com.h2database:h2:2.2.224"
testImplementation "org.postgresql:postgresql:42.6.0"
}