Skip to content

Commit f356d62

Browse files
committed
FIN-354 upgrade build to new structure
1 parent 3e30541 commit f356d62

File tree

10 files changed

+98
-224
lines changed

10 files changed

+98
-224
lines changed

bpmn-process/build.gradle.kts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,21 @@
1-
plugins {
2-
java
3-
id("io.micronaut.library")
4-
id("io.freefair.lombok")
5-
}
6-
71
micronaut {
82
testRuntime("junit5")
9-
processing {
10-
incremental(true)
11-
}
123
}
134

145
dependencies {
6+
annotationProcessor(mn.lombok)
7+
testAnnotationProcessor(mn.lombok)
8+
159
implementation(libs.lang)
1610
implementation(libs.lang.xml)
1711
implementation(libs.camunda)
1812

1913
implementation(libs.bouncy)
2014
implementation(libs.csv)
2115

16+
compileOnly(mn.lombok)
17+
testCompileOnly(mn.lombok)
18+
2219
// Investigate if this can be swapped for micronaut serde
2320
implementation(mn.micronaut.jackson.databind)
2421
implementation(mn.micronaut.serde.jackson)

build.gradle

Lines changed: 0 additions & 194 deletions
This file was deleted.

build.gradle.kts

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
plugins {
2+
id("io.micronaut.library") apply false
3+
id("maven-publish")
4+
id("signing")
5+
id("java")
6+
}
7+
8+
var isCiCd = System.getProperty("cicd") == "true"
9+
10+
subprojects {
11+
apply(plugin = "java")
12+
apply(plugin = "io.micronaut.library")
13+
14+
apply(plugin = "signing")
15+
apply(plugin = "maven-publish")
16+
17+
if (isCiCd) {
18+
// when running in CI/CD environment we need to build with sources and JavaDoc and publish to maven central
19+
java {
20+
withSourcesJar()
21+
withJavadocJar()
22+
}
23+
24+
tasks.javadoc {
25+
options {
26+
// silence the Javadoc generation
27+
this as StandardJavadocDocletOptions
28+
addBooleanOption("Xdoclint:none", true)
29+
}
30+
}
31+
32+
publishing {
33+
publications {
34+
create<MavenPublication>("maven") {
35+
groupId = "com.jongsoft.finance"
36+
version = "3.3.0-SNAPSHOT"
37+
38+
from(components["java"])
39+
40+
pom {
41+
description = "The REST-API for Pledger.ioS"
42+
url = "https://www.pledger.io/"
43+
name = project.name
44+
scm {
45+
connection = "scm:git:git@bitbucket.org:jongsoftdev/fintrack-application.git"
46+
developerConnection = "scm:git:git@bitbucket.org:jongsoftdev/fintrack-application.git"
47+
url = "https://bitbucket.org/jongsoftdev/fintrack-application/src/master/"
48+
}
49+
licenses {
50+
license {
51+
name = "MIT License"
52+
url = "http://www.opensource.org/licenses/mit-license.php"
53+
}
54+
}
55+
developers {
56+
developer {
57+
id = "gjong"
58+
name = "Gerben Jongerius"
59+
email = "g.jongerius@jong-soft.com"
60+
}
61+
}
62+
}
63+
}
64+
}
65+
66+
repositories {
67+
maven {
68+
url = uri(layout.buildDirectory.dir("repo"))
69+
70+
if (System.getenv("CI") == "true")
71+
credentials {
72+
username = System.getenv("OSSRH_USERNAME")
73+
password = System.getenv("OSSRH_PASSWORD")
74+
}
75+
}
76+
}
77+
}
78+
79+
signing {
80+
sign(publishing.publications["maven"])
81+
}
82+
}
83+
}

core/build.gradle.kts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
plugins {
2-
id("io.micronaut.library")
3-
}
41
micronaut {
52
testRuntime("junit5")
63
}

domain/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
plugins {
2-
id("io.micronaut.library")
32
id("io.freefair.lombok")
43
}
54

gradle.properties

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1 @@
11
micronautVersion=4.3.4
2-
camundaVersion=7.20.0
3-
lombokVersion=1.18.28
4-
assertjVersion=3.22.0
5-
mockitoVersion=4.5.0
6-
jongsoftLangVersion=1.1.6
7-
bouncyCastleVersion=1.70
8-
openCSVVersion=5.7.1
9-
version=3.3.0-SNAPSHOT
10-
group=com.jongsoft.finance

jpa-repository/build.gradle.kts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
plugins {
2-
id("io.micronaut.library")
3-
}
41

52
micronaut {
63
testRuntime("junit5")
@@ -14,6 +11,7 @@ dependencies {
1411

1512
implementation(mn.micronaut.jdbc.hikari)
1613
implementation(mn.micronaut.hibernate.jpa)
14+
implementation(mn.micronaut.data.tx.hibernate)
1715
implementation(mn.micronaut.data.jpa)
1816
implementation(mn.micronaut.data.jdbc)
1917
implementation(mn.micronaut.flyway)
@@ -29,7 +27,7 @@ dependencies {
2927
runtimeOnly(mn.mysql.connector.java)
3028
runtimeOnly(mn.flyway.mysql)
3129

32-
testRuntimeOnly(mn.snakeyaml)
30+
runtimeOnly(mn.snakeyaml)
3331
testRuntimeOnly(mn.logback.classic)
3432
testImplementation(mn.micronaut.test.junit5)
3533
testImplementation(libs.bundles.junit)

jpa-repository/src/main/java/com/jongsoft/finance/jpa/reactive/JpaPipe.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ abstract class JpaPipe<T, R extends JpaPipe<T, R>> {
2525
}
2626

2727
/**
28-
* Set a parameter to be replaced in the {@link #hql(java.lang.String)} operation. Note that
28+
* Set a parameter to be replaced in the {@link JpaPipe#hql(java.lang.String)} operation. Note that
2929
* this will replace any parameter with the same name.
3030
*
3131
* @param parameter the name of the parameter
@@ -105,8 +105,7 @@ String sort() {
105105
return "";
106106
}
107107

108-
return """
109-
order by %s %s""".formatted(
108+
return " order by %s %s".formatted(
110109
sort.get().field(),
111110
sort.get().ascending() ? "asc" : "desc");
112111
}

rule-engine/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
plugins {
2-
id("io.micronaut.library")
32
id("io.freefair.lombok")
43
}
54

65
dependencies {
76
implementation(libs.lang)
87
implementation(project(":core"))
98
implementation(project(":domain"))
9+
10+
testImplementation(libs.bundles.junit)
1011
}

0 commit comments

Comments
 (0)