-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
80 lines (69 loc) · 1.69 KB
/
build.gradle.kts
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
/*
* SPDX-FileCopyrightText: 2024 INFO
* SPDX-License-Identifier: EUPL-1.2+
*/
import java.net.URI
plugins {
java
`maven-publish`
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.detekt)
alias(libs.plugins.xjc)
}
repositories {
mavenLocal()
mavenCentral()
}
sourceSets {
create("generated") {
java {
srcDir("build/generated/sources/xjc/java/main")
}
}
}
group = "nl.amsterdam.stadsbank"
description = "SEPA client library for Stadsbank van Lening Amsterdam"
publishing {
publications {
create<MavenPublication>("Jar") {
from(components["java"])
}
}
repositories {
maven {
name = "GitHub"
url = URI("https://maven.pkg.github.com/infonl/lib-sepa")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}
val javaVersion = JavaVersion.VERSION_18
dependencies {
implementation(libs.kotlin.stdlib)
implementation(libs.jaxb.api)
implementation(libs.jaxb.core)
implementation(libs.jaxb.runtime)
implementation(libs.oss.iban)
}
detekt {
toolVersion = libs.versions.detekt.get()
}
tasks.named<JavaCompile>("compileGeneratedJava") {
dependsOn("xjcGenerate")
source = sourceSets["generated"].java
classpath = sourceSets["main"].compileClasspath
destinationDirectory.set(file("build/classes/generated"))
}
tasks.named("compileKotlin") {
dependsOn(tasks.named("compileGeneratedJava"))
}
// Place the schema file into the JAR
tasks.named<Jar>("jar") {
from("src/main/schema") {
include("*.xsd")
into("schema")
}
}