-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
105 lines (86 loc) · 3.12 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
plugins {
id 'java-library'
id 'com.github.ben-manes.versions'
id 'io.spring.dependency-management' apply false
}
wrapper {
gradleVersion = "${gradleVersion}"
}
apply from: 'gradle/javafx.gradle'
repositories {
mavenCentral()
}
java {
// https://docs.gradle.org/current/userguide/toolchains.html
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
// Use Eclipse Temurin (provided by Adoptium).
vendor.set(JvmVendorSpec.ADOPTIUM)
}
}
allprojects {
group = 'de.heiden.c64dt'
version = '1.0-SNAPSHOT'
}
subprojects {
apply plugin: 'java-library'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'maven-publish'
repositories {
mavenCentral()
}
archivesBaseName = "${rootProject.name}-${project.name}"
dependencies {
implementation "org.slf4j:slf4j-api:${slf4jVersion}"
runtimeOnly "org.apache.logging.log4j:log4j-slf4j2-impl:${log4jVersion}"
runtimeOnly "org.apache.logging.log4j:log4j-core:${log4jVersion}"
implementation "com.github.cowwoc.requirements:java:${requirementsVersion}"
testImplementation "org.junit.jupiter:junit-jupiter-api:${junitVersion}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junitVersion}"
testImplementation "org.assertj:assertj-core:${assertjVersion}"
}
dependencyManagement {
dependencies {
dependencySet("org.springframework:${springVersion}") {
entry 'spring-beans'
entry 'spring-context'
entry 'spring-core'
}
dependency "org.springframework:spring-beans:${springVersion}"
dependency "org.springframework:spring-context:${springVersion}"
dependency "commons-io:commons-io:${commonsIoVersion}"
dependency "jakarta.annotation:jakarta.annotation-api:${annotationVersion}"
dependency "jakarta.xml.bind:jakarta.xml.bind-api:${jaxbVersion}"
dependency "org.glassfish.jaxb:jaxb-runtime:${glassfishJaxbVersion}"
// dependencySet("org.openjfx:${openjfxVersion}:${openjfxPlatform}") {
// entry "javafx-base"
// entry "javafx-controls"
// entry "javafx-graphics"
// }
}
}
configurations.all {
// Exclude logback provided via spring.
exclude group: 'ch.qos.logback', module: 'logback-classic'
}
publishing {
publications {
maven(MavenPublication) {
from components.java
// Needed because otherwise the dependencies are only in the dependency management section of the pom.
// So gradle users are missing the version in the dependencies section and fail to resolve the dependencies.
versionMapping {
usage('java-runtime') {
fromResolutionResult()
}
}
}
}
}
build.dependsOn publishToMavenLocal
test {
useJUnitPlatform()
// ignore failing tests
ignoreFailures = true
}
}