-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle
More file actions
99 lines (79 loc) · 2.76 KB
/
build.gradle
File metadata and controls
99 lines (79 loc) · 2.76 KB
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
plugins {
// Apply the java-library plugin for API and implementation separation.
id 'java-library'
id "antlr"
id "com.github.johnrengelman.shadow" version "7.1.2"
id 'net.researchgate.release' version '3.0.2'
id "io.github.gradle-nexus.publish-plugin" version "1.1.0"
}
apply from: "${rootDir}/nexus.gradle"
repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
dependencies {
antlr("org.antlr:antlr4:4.11.1")
api("org.antlr:antlr4-runtime:4.11.1")
compileOnly 'org.projectlombok:lombok:1.18.24'
annotationProcessor 'org.projectlombok:lombok:1.18.24'
implementation group: 'com.mageddo.commons-jdbc', name: 'commons-jdbc', version: '0.1.3'
implementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.6'
implementation group: 'org.apache.commons', name: 'commons-csv', version: '1.9.0'
testCompileOnly 'org.projectlombok:lombok:1.18.24'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.24'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.1'
testImplementation 'org.jdbi:jdbi3-core:3.36.0'
testImplementation group: 'com.h2database', name: 'h2', version: '2.1.214'
testImplementation group: 'org.postgresql', name: 'postgresql', version: '9.4.1212'
testImplementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
}
tasks.named('test') {
// Use junit platform for unit tests.
useJUnitPlatform()
}
compileTestJava {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
shadowJar {
archiveFileName = "${project.name}-${project.version}.jar"
dependencies {
exclude(dependency('org.antlr:antlr4:'))
exclude(dependency(':antlr-runtime:'))
exclude(dependency(':ST4:'))
exclude(dependency(':org.abego.treelayout.core:'))
exclude(dependency(':javax.json:'))
exclude(dependency(':icu4j:'))
}
relocate 'org.apache.commons.csv', 'com.mageddo.thirdparty.org.apache.commons.csv'
}
assemble.dependsOn shadowJar
generateGrammarSource {
outputDirectory = file("${outputDirectory}/com/mageddo/antlr")
// arguments += ['-package', 'org.mellowd.compiler']
}
processResources {
filesMatching('**/info.properties') {
expand(project.properties)
}
}
release {
project.ext.set("release.useAutomaticVersion", true)
git {
requireBranch.set("master")
}
failOnCommitNeeded = false
failOnPublishNeeded = false
failOnUnversionedFiles = false
buildTasks = []
}
confirmReleaseVersion.doLast {
def f = file("${project.projectDir}/README.md")
def text = f.text
f.withWriter { w ->
w << text.replaceAll("(:\\ )*\\d+\\.\\d+\\.\\d+", "\$1${version}")
}
}