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

@@ -0,0 +1,17 @@
plugins {
id 'org.springframework.statemachine.sample'
}
description = 'Spring State Machine CD Player Sample'
dependencies {
management platform(project(":spring-statemachine-platform"))
implementation project(':spring-statemachine-samples-common')
implementation project(':spring-statemachine-core')
implementation 'org.springframework.shell:spring-shell'
testImplementation(testFixtures(project(':spring-statemachine-core')))
testImplementation 'io.projectreactor:reactor-test'
testImplementation 'org.assertj:assertj-core'
testImplementation 'org.junit.jupiter:junit-jupiter-api'
testImplementation 'org.junit.jupiter:junit-jupiter-engine'
}

View File

@@ -0,0 +1,26 @@
plugins {
id 'org.springframework.statemachine.sample'
}
description = 'Spring State Machine Data Jpa Sample'
dependencies {
management platform(project(":spring-statemachine-platform"))
implementation project(':spring-statemachine-samples-common')
implementation project(':spring-statemachine-autoconfigure')
implementation project(':spring-statemachine-data-common:spring-statemachine-data-jpa')
implementation('org.springframework.boot:spring-boot-starter-web')
implementation('org.springframework.boot:spring-boot-starter-thymeleaf')
implementation('org.springframework.boot:spring-boot-starter-data-jpa')
implementation('org.springframework.boot:spring-boot-devtools')
implementation('com.h2database:h2')
testImplementation(testFixtures(project(':spring-statemachine-core')))
testImplementation 'org.hamcrest:hamcrest-core'
testImplementation 'org.hamcrest:hamcrest-library'
testImplementation 'org.springframework.boot:spring-boot-test'
testImplementation 'org.springframework:spring-test'
testImplementation 'io.projectreactor:reactor-test'
testImplementation 'org.assertj:assertj-core'
testImplementation 'org.junit.jupiter:junit-jupiter-api'
testImplementation 'org.junit.jupiter:junit-jupiter-engine'
}

View File

@@ -0,0 +1,26 @@
plugins {
id 'org.springframework.statemachine.sample'
}
description = 'Spring State Machine Data Jpa Multi Persist Sample'
dependencies {
management platform(project(":spring-statemachine-platform"))
implementation project(':spring-statemachine-samples-common')
implementation project(':spring-statemachine-autoconfigure')
implementation project(':spring-statemachine-data-common:spring-statemachine-data-jpa')
implementation('org.springframework.boot:spring-boot-starter-web')
implementation('org.springframework.boot:spring-boot-starter-thymeleaf')
implementation('org.springframework.boot:spring-boot-starter-data-jpa')
implementation('org.springframework.boot:spring-boot-devtools')
implementation('com.h2database:h2')
testImplementation(testFixtures(project(':spring-statemachine-core')))
testImplementation 'org.hamcrest:hamcrest-core'
testImplementation 'org.hamcrest:hamcrest-library'
testImplementation 'org.springframework.boot:spring-boot-test'
testImplementation 'org.springframework:spring-test'
testImplementation 'io.projectreactor:reactor-test'
testImplementation 'org.assertj:assertj-core'
testImplementation 'org.junit.jupiter:junit-jupiter-api'
testImplementation 'org.junit.jupiter:junit-jupiter-engine'
}

View File

@@ -0,0 +1,30 @@
plugins {
id 'org.springframework.statemachine.sample'
}
description = 'Spring State Machine Data Persist Sample'
dependencies {
management platform(project(":spring-statemachine-platform"))
implementation project(':spring-statemachine-samples-common')
implementation project(':spring-statemachine-autoconfigure')
implementation project(':spring-statemachine-data-common:spring-statemachine-data-jpa')
implementation project(':spring-statemachine-data-common:spring-statemachine-data-redis')
implementation project(':spring-statemachine-data-common:spring-statemachine-data-mongodb')
implementation('org.springframework.boot:spring-boot-starter-web')
implementation('org.springframework.boot:spring-boot-starter-thymeleaf')
implementation('org.springframework.boot:spring-boot-starter-data-jpa')
implementation('org.springframework.boot:spring-boot-starter-data-redis')
implementation('org.springframework.boot:spring-boot-starter-data-mongodb')
implementation('org.springframework.boot:spring-boot-devtools')
implementation('com.h2database:h2')
testImplementation(testFixtures(project(':spring-statemachine-core')))
testImplementation 'org.hamcrest:hamcrest-core'
testImplementation 'org.hamcrest:hamcrest-library'
testImplementation 'org.springframework.boot:spring-boot-test'
testImplementation 'org.springframework:spring-test'
testImplementation 'io.projectreactor:reactor-test'
testImplementation 'org.assertj:assertj-core'
testImplementation 'org.junit.jupiter:junit-jupiter-api'
testImplementation 'org.junit.jupiter:junit-jupiter-engine'
}

View File

@@ -0,0 +1,23 @@
plugins {
id 'org.springframework.statemachine.sample'
}
description = 'Spring State Machine Deploy Sample'
dependencies {
management platform(project(":spring-statemachine-platform"))
implementation project(':spring-statemachine-samples-common')
implementation project(':spring-statemachine-uml')
implementation('org.springframework.boot:spring-boot-starter-web')
implementation('org.springframework.boot:spring-boot-starter-thymeleaf')
testImplementation(testFixtures(project(':spring-statemachine-core')))
testImplementation (project(':spring-statemachine-test'))
testImplementation 'org.hamcrest:hamcrest-core'
testImplementation 'org.hamcrest:hamcrest-library'
testImplementation 'org.springframework.boot:spring-boot-test'
testImplementation 'org.springframework:spring-test'
testImplementation 'io.projectreactor:reactor-test'
testImplementation 'org.assertj:assertj-core'
testImplementation 'org.junit.jupiter:junit-jupiter-api'
testImplementation 'org.junit.jupiter:junit-jupiter-engine'
}

View File

@@ -0,0 +1,25 @@
plugins {
id 'org.springframework.statemachine.sample'
}
description = 'Spring State Machine Event Service Sample'
dependencies {
management platform(project(":spring-statemachine-platform"))
implementation project(':spring-statemachine-samples-common')
implementation project(':spring-statemachine-data-common:spring-statemachine-data-redis')
implementation('org.springframework.boot:spring-boot-starter-web')
implementation('org.springframework.boot:spring-boot-starter-thymeleaf')
implementation('org.apache.commons:commons-pool2')
implementation('redis.clients:jedis')
testImplementation(testFixtures(project(':spring-statemachine-core')))
testImplementation (project(':spring-statemachine-test'))
testImplementation 'org.hamcrest:hamcrest-core'
testImplementation 'org.hamcrest:hamcrest-library'
testImplementation 'org.springframework.boot:spring-boot-test'
testImplementation 'org.springframework:spring-test'
testImplementation 'io.projectreactor:reactor-test'
testImplementation 'org.assertj:assertj-core'
testImplementation 'org.junit.jupiter:junit-jupiter-api'
testImplementation 'org.junit.jupiter:junit-jupiter-engine'
}

View File

@@ -0,0 +1,26 @@
plugins {
id 'org.springframework.statemachine.sample'
}
description = 'Spring State Machine Monitoring Sample'
dependencies {
management platform(project(":spring-statemachine-platform"))
implementation project(':spring-statemachine-samples-common')
implementation project(':spring-statemachine-autoconfigure')
implementation('org.springframework.boot:spring-boot-starter-actuator')
implementation('org.springframework.boot:spring-boot-starter-web')
implementation('org.springframework.boot:spring-boot-starter-thymeleaf')
testImplementation(testFixtures(project(':spring-statemachine-core')))
testImplementation (project(':spring-statemachine-test'))
testImplementation('com.jayway.jsonpath:json-path')
testImplementation('com.jayway.jsonpath:json-path-assert')
testImplementation 'org.hamcrest:hamcrest-core'
testImplementation 'org.hamcrest:hamcrest-library'
testImplementation 'org.springframework.boot:spring-boot-test'
testImplementation 'org.springframework:spring-test'
testImplementation 'io.projectreactor:reactor-test'
testImplementation 'org.assertj:assertj-core'
testImplementation 'org.junit.jupiter:junit-jupiter-api'
testImplementation 'org.junit.jupiter:junit-jupiter-engine'
}

View File

@@ -0,0 +1,23 @@
plugins {
id 'org.springframework.statemachine.sample'
}
description = 'Spring State Machine Order Shipping Sample'
dependencies {
management platform(project(":spring-statemachine-platform"))
implementation project(':spring-statemachine-samples-common')
implementation project(':spring-statemachine-uml')
implementation('org.springframework.boot:spring-boot-starter-web')
implementation('org.springframework.boot:spring-boot-starter-thymeleaf')
testImplementation(testFixtures(project(':spring-statemachine-core')))
testImplementation (project(':spring-statemachine-test'))
testImplementation 'org.hamcrest:hamcrest-core'
testImplementation 'org.hamcrest:hamcrest-library'
testImplementation 'org.springframework.boot:spring-boot-test'
testImplementation 'org.springframework:spring-test'
testImplementation 'io.projectreactor:reactor-test'
testImplementation 'org.assertj:assertj-core'
testImplementation 'org.junit.jupiter:junit-jupiter-api'
testImplementation 'org.junit.jupiter:junit-jupiter-engine'
}

View File

@@ -0,0 +1,25 @@
plugins {
id 'org.springframework.statemachine.sample'
}
description = 'Spring State Machine Persist Sample'
dependencies {
management platform(project(":spring-statemachine-platform"))
implementation project(':spring-statemachine-samples-common')
implementation project(':spring-statemachine-recipes-common')
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.shell:spring-shell'
implementation ('org.hsqldb:hsqldb')
implementation ('org.springframework:spring-jdbc')
testImplementation(testFixtures(project(':spring-statemachine-core')))
testImplementation (project(':spring-statemachine-test'))
testImplementation 'org.hamcrest:hamcrest-core'
testImplementation 'org.hamcrest:hamcrest-library'
testImplementation 'org.springframework.boot:spring-boot-test'
testImplementation 'org.springframework:spring-test'
testImplementation 'io.projectreactor:reactor-test'
testImplementation 'org.assertj:assertj-core'
testImplementation 'org.junit.jupiter:junit-jupiter-api'
testImplementation 'org.junit.jupiter:junit-jupiter-engine'
}

View File

@@ -0,0 +1,15 @@
plugins {
id 'org.springframework.statemachine.sample'
}
description = 'Spring State Machine Web Scope Sample'
dependencies {
management platform(project(":spring-statemachine-platform"))
implementation project(':spring-statemachine-samples-common')
implementation project(':spring-statemachine-core')
implementation 'org.springframework:spring-messaging'
implementation 'io.projectreactor:reactor-core'
implementation('org.springframework.boot:spring-boot-starter-web')
implementation('org.springframework.boot:spring-boot-starter-thymeleaf')
}

View File

@@ -0,0 +1,17 @@
plugins {
id 'org.springframework.statemachine.sample'
}
description = 'Spring State Machine Web Security Sample'
dependencies {
management platform(project(":spring-statemachine-platform"))
implementation project(':spring-statemachine-samples-common')
implementation project(':spring-statemachine-core')
implementation 'org.springframework:spring-messaging'
implementation('org.springframework.boot:spring-boot-starter-web')
implementation('org.springframework.boot:spring-boot-starter-thymeleaf')
implementation('org.springframework.boot:spring-boot-starter-security')
implementation('org.springframework.security:spring-security-config')
implementation('org.springframework.security:spring-security-web')
}

View File

@@ -0,0 +1,22 @@
plugins {
id 'org.springframework.statemachine.sample'
}
description = 'Spring State Machine Showcase Sample'
dependencies {
management platform(project(":spring-statemachine-platform"))
implementation project(':spring-statemachine-samples-common')
implementation project(':spring-statemachine-core')
implementation 'org.springframework.shell:spring-shell'
testImplementation(testFixtures(project(':spring-statemachine-core')))
testImplementation (project(':spring-statemachine-test'))
testImplementation 'org.hamcrest:hamcrest-core'
testImplementation 'org.hamcrest:hamcrest-library'
testImplementation 'org.springframework.boot:spring-boot-test'
testImplementation 'org.springframework:spring-test'
testImplementation 'io.projectreactor:reactor-test'
testImplementation 'org.assertj:assertj-core'
testImplementation 'org.junit.jupiter:junit-jupiter-api'
testImplementation 'org.junit.jupiter:junit-jupiter-engine'
}

View File

@@ -0,0 +1,12 @@
plugins {
id 'org.springframework.statemachine.sample'
}
description = 'Spring State Machine Samples Common'
dependencies {
management platform(project(":spring-statemachine-platform"))
implementation project(':spring-statemachine-core')
implementation 'org.springframework.shell:spring-shell'
implementation 'org.springframework.boot:spring-boot-starter'
}

View File

@@ -0,0 +1,23 @@
plugins {
id 'org.springframework.statemachine.sample'
}
description = 'Spring State Machine Parallel Regions Sample'
dependencies {
management platform(project(":spring-statemachine-platform"))
implementation project(':spring-statemachine-samples-common')
implementation project(':spring-statemachine-core')
implementation 'org.springframework.shell:spring-shell'
testImplementation(testFixtures(project(':spring-statemachine-core')))
testImplementation (project(':spring-statemachine-test'))
testImplementation 'org.hamcrest:hamcrest-core'
testImplementation 'org.hamcrest:hamcrest-library'
testImplementation 'org.springframework.boot:spring-boot-test'
testImplementation 'org.springframework:spring-test'
testImplementation 'io.projectreactor:reactor-test'
testImplementation 'org.assertj:assertj-core'
testImplementation 'org.junit.jupiter:junit-jupiter-api'
testImplementation 'org.junit.jupiter:junit-jupiter-engine'
testImplementation 'io.projectreactor.tools:blockhound'
}

View File

@@ -0,0 +1,22 @@
plugins {
id 'org.springframework.statemachine.sample'
}
description = 'Spring State Machine Turnstile Sample'
dependencies {
management platform(project(":spring-statemachine-platform"))
implementation project(':spring-statemachine-samples-common')
implementation project(':spring-statemachine-core')
implementation 'org.springframework.shell:spring-shell'
testImplementation(testFixtures(project(':spring-statemachine-core')))
testImplementation (project(':spring-statemachine-test'))
testImplementation 'org.hamcrest:hamcrest-core'
testImplementation 'org.hamcrest:hamcrest-library'
testImplementation 'org.springframework.boot:spring-boot-test'
testImplementation 'org.springframework:spring-test'
testImplementation 'io.projectreactor:reactor-test'
testImplementation 'org.assertj:assertj-core'
testImplementation 'org.junit.jupiter:junit-jupiter-api'
testImplementation 'org.junit.jupiter:junit-jupiter-engine'
}

View File

@@ -0,0 +1,26 @@
plugins {
id 'org.springframework.statemachine.sample'
}
description = 'Spring State Machine Turnstile Reactive Sample'
dependencies {
management platform(project(":spring-statemachine-platform"))
implementation project(':spring-statemachine-samples-common')
implementation project(':spring-statemachine-core')
implementation 'org.springframework.boot:spring-boot-starter-webflux'
implementation 'org.springframework:spring-messaging'
testImplementation(testFixtures(project(':spring-statemachine-core')))
testImplementation (project(':spring-statemachine-test'))
testImplementation('com.jayway.jsonpath:json-path')
testImplementation('com.jayway.jsonpath:json-path-assert')
testImplementation 'org.hamcrest:hamcrest-core'
testImplementation 'org.hamcrest:hamcrest-library'
testImplementation 'org.springframework.boot:spring-boot-test'
testImplementation 'org.springframework:spring-test'
testImplementation 'io.projectreactor:reactor-test'
testImplementation 'org.assertj:assertj-core'
testImplementation 'org.junit.jupiter:junit-jupiter-api'
testImplementation 'org.junit.jupiter:junit-jupiter-engine'
testImplementation 'io.projectreactor.tools:blockhound'
}

View File

@@ -0,0 +1,22 @@
plugins {
id 'org.springframework.statemachine.sample'
}
description = 'Spring State Machine History State Sample'
dependencies {
management platform(project(":spring-statemachine-platform"))
implementation project(':spring-statemachine-samples-common')
implementation project(':spring-statemachine-core')
implementation 'org.springframework.shell:spring-shell'
testImplementation(testFixtures(project(':spring-statemachine-core')))
testImplementation (project(':spring-statemachine-test'))
testImplementation 'org.hamcrest:hamcrest-core'
testImplementation 'org.hamcrest:hamcrest-library'
testImplementation 'org.springframework.boot:spring-boot-test'
testImplementation 'org.springframework:spring-test'
testImplementation 'io.projectreactor:reactor-test'
testImplementation 'org.assertj:assertj-core'
testImplementation 'org.junit.jupiter:junit-jupiter-api'
testImplementation 'org.junit.jupiter:junit-jupiter-engine'
}

View File

@@ -0,0 +1,18 @@
plugins {
id 'org.springframework.statemachine.sample'
}
description = 'Spring State Machine Web Sample'
dependencies {
management platform(project(":spring-statemachine-platform"))
implementation project(':spring-statemachine-samples-common')
implementation project(':spring-statemachine-cluster')
implementation('org.springframework.boot:spring-boot-starter-security')
implementation('org.springframework.boot:spring-boot-starter-web')
implementation('org.springframework.boot:spring-boot-starter-websocket')
implementation('org.springframework:spring-webmvc')
implementation('org.springframework:spring-websocket')
implementation('org.springframework.security:spring-security-messaging')
implementation('org.springframework.session:spring-session-core')
}

View File

@@ -0,0 +1,13 @@
plugins {
id 'org.springframework.statemachine.sample'
}
description = 'Spring State Machine Distributed Sample'
dependencies {
management platform(project(":spring-statemachine-platform"))
implementation project(':spring-statemachine-zookeeper')
implementation project(':spring-statemachine-samples-common')
implementation project(':spring-statemachine-core')
implementation 'org.springframework.shell:spring-shell'
}