Overhaul gradle build

- Focus of this commit is to have modern gradle build.
- Migrate most of a plugin configurations from dsl
  into buildSrc.
- This fixes issues with existing docs build.
- Allows to sign files so that we have that part
  done for central in a build.
- We can skip publishing samples.
- We're able to share similar logic for modules
  which are meant for publish or just being samples.
- It's easier to upgrade gradle versions without
  getting various build issues.
- Relates #1143
This commit is contained in:
Janne Valkealahti
2024-03-14 12:26:06 +00:00
parent 1b2a868ab5
commit e62b09d2bb
60 changed files with 2128 additions and 954 deletions

View File

@@ -1,58 +0,0 @@
description = 'Spring State Machine Data Common'
project('spring-statemachine-data-jpa') {
apply from: "$rootDir/gradle/java-test-fixtures.gradle"
description = 'Spring State Machine Data Jpa'
dependencies {
api project(':spring-statemachine-data-common')
api 'org.springframework:spring-orm'
testImplementation project(':spring-statemachine-test')
testImplementation(testFixtures(project(":spring-statemachine-data-common")))
testImplementation(testFixtures(project(":spring-statemachine-core")))
testImplementation 'io.projectreactor:reactor-test'
optional 'jakarta.persistence:jakarta.persistence-api'
testImplementation 'org.hsqldb:hsqldb'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.springframework.boot:spring-boot-starter-data-jpa'
testRuntimeOnly 'org.springframework.boot:spring-boot-starter-web'
}
}
project('spring-statemachine-data-redis') {
apply from: "$rootDir/gradle/java-test-fixtures.gradle"
description = 'Spring State Machine Data Redis'
dependencies {
api project(':spring-statemachine-data-common')
api 'org.springframework.data:spring-data-redis'
testImplementation project(':spring-statemachine-test')
optional 'jakarta.persistence:jakarta.persistence-api'
testImplementation(testFixtures(project(":spring-statemachine-data-common")))
testImplementation(testFixtures(project(":spring-statemachine-core")))
testImplementation 'io.projectreactor:reactor-test'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.apache.commons:commons-pool2'
testRuntimeOnly 'redis.clients:jedis'
testRuntimeOnly 'org.springframework.boot:spring-boot-starter-data-redis'
testRuntimeOnly 'org.springframework.boot:spring-boot-starter-web'
}
}
project('spring-statemachine-data-mongodb') {
apply from: "$rootDir/gradle/java-test-fixtures.gradle"
description = 'Spring State Machine Data MongoDB'
dependencies {
api project(':spring-statemachine-data-common')
api 'org.springframework.data:spring-data-mongodb'
testImplementation project(':spring-statemachine-test')
optional 'jakarta.persistence:jakarta.persistence-api'
testImplementation(testFixtures(project(":spring-statemachine-data-common")))
testImplementation(testFixtures(project(":spring-statemachine-core")))
testImplementation 'io.projectreactor:reactor-test'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.springframework.boot:spring-boot-starter-data-mongodb'
testRuntimeOnly 'org.springframework.boot:spring-boot-starter-web'
}
}

View File

@@ -0,0 +1,20 @@
plugins {
id 'org.springframework.statemachine.module'
}
description = 'Spring State Machine Data Jpa'
dependencies {
management platform(project(":spring-statemachine-platform"))
api project(':spring-statemachine-data-common')
api('org.springframework:spring-orm')
optional 'jakarta.persistence:jakarta.persistence-api'
testImplementation project(':spring-statemachine-test')
testImplementation(testFixtures(project(':spring-statemachine-data-common')))
testImplementation(testFixtures(project(':spring-statemachine-core')))
testImplementation 'io.projectreactor:reactor-test'
testImplementation 'org.hsqldb:hsqldb'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.springframework.boot:spring-boot-starter-data-jpa'
testRuntimeOnly 'org.springframework.boot:spring-boot-starter-web'
}

View File

@@ -0,0 +1,18 @@
plugins {
id 'org.springframework.statemachine.module'
}
description = 'Spring State Machine Data MongoDB'
dependencies {
management platform(project(":spring-statemachine-platform"))
api project(':spring-statemachine-data-common')
api 'org.springframework.data:spring-data-mongodb'
testImplementation project(':spring-statemachine-test')
testImplementation(testFixtures(project(':spring-statemachine-data-common')))
testImplementation(testFixtures(project(':spring-statemachine-core')))
testImplementation 'io.projectreactor:reactor-test'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.springframework.boot:spring-boot-starter-data-mongodb'
testRuntimeOnly 'org.springframework.boot:spring-boot-starter-web'
}

View File

@@ -0,0 +1,21 @@
plugins {
id 'org.springframework.statemachine.module'
}
description = 'Spring State Machine Data Redis'
dependencies {
management platform(project(":spring-statemachine-platform"))
api project(':spring-statemachine-data-common')
api 'org.springframework.data:spring-data-redis'
testImplementation project(':spring-statemachine-test')
testImplementation(testFixtures(project(':spring-statemachine-data-common')))
testImplementation(testFixtures(project(':spring-statemachine-core')))
testImplementation 'io.projectreactor:reactor-test'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.apache.commons:commons-pool2'
testRuntimeOnly 'redis.clients:jedis'
testRuntimeOnly 'org.springframework.boot:spring-boot-starter-data-redis'
testRuntimeOnly 'org.springframework.boot:spring-boot-starter-web'
testImplementation 'io.projectreactor.tools:blockhound'
}

View File

@@ -0,0 +1,21 @@
plugins {
id 'org.springframework.statemachine.module'
}
description = 'Spring State Machine Data Common'
dependencies {
management platform(project(":spring-statemachine-platform"))
api project(':spring-statemachine-core')
api project(':spring-statemachine-kryo')
api 'org.springframework.data:spring-data-commons'
api 'com.fasterxml.jackson.core:jackson-core'
api 'com.fasterxml.jackson.core:jackson-databind'
testImplementation (project(':spring-statemachine-test'))
testFixturesImplementation (project(':spring-statemachine-test'))
testImplementation(testFixtures(project(':spring-statemachine-core')))
testImplementation 'io.projectreactor:reactor-test'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testFixturesImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.springframework.boot:spring-boot-starter-web'
}