-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
77 lines (61 loc) · 1.89 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
plugins {
id 'maven-publish'
id 'signing'
id 'org.flywaydb.flyway' version '9.22.3'
id 'nu.studer.jooq' version '8.2.3'
id 'io.spring.dependency-management' version '1.1.4'
id 'org.ajoberstar.grgit' version '5.2.0'
}
subprojects {
apply plugin: 'java'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'java-library'
repositories {
mavenLocal()
mavenCentral()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
}
archivesBaseName = 'ledger-sync-' + project.name
def commit_id=getCheckedOutGitCommitHash()
if (project.version.endsWith("-SNAPSHOT")) {
version = "${project.version}".replace("-SNAPSHOT", "-${commit_id}-SNAPSHOT")
}
dependencyManagement {
imports {
mavenBom("org.springframework.boot:spring-boot-dependencies:3.2.2")
mavenBom "org.springframework.cloud:spring-cloud-dependencies:2023.0.0"
}
}
dependencies {
implementation(libs.map.struct)
compileOnly(libs.lombok)
annotationProcessor(libs.lombok)
annotationProcessor(libs.lombok.mapstruct.binding)
annotationProcessor(libs.mapstruct.processor)
}
compileJava {
sourceCompatibility = '21'
targetCompatibility = '21'
options.compilerArgs += ["-Aproject=${project.group}/${project.name}", "-parameters"]
options.compilerArgs += ['-Amapstruct.defaultComponentModel=spring']
}
tasks.withType(Javadoc) {
options.encoding = 'UTF-8'
}
task sourceJar(type: Jar) {
from sourceSets.main.allSource
archiveClassifier.set('sources')
}
task javadocJar(type: Jar) {
from javadoc
archiveClassifier.set('javadoc')
}
test {
useJUnitPlatform()
}
}
def getCheckedOutGitCommitHash() {
grgit.head().abbreviatedId
}