233 lines
6.6 KiB
Groovy
233 lines
6.6 KiB
Groovy
buildscript {
|
|
ext.isCI = System.getenv('GITHUB_ACTION')
|
|
}
|
|
|
|
plugins {
|
|
id 'java-library'
|
|
id 'eclipse'
|
|
id 'idea'
|
|
id 'checkstyle'
|
|
id 'org.ajoberstar.grgit' version '5.2.2'
|
|
id 'io.spring.dependency-management' version '1.1.6'
|
|
}
|
|
|
|
description = 'Spring Integration AWS Support'
|
|
|
|
group = 'org.springframework.integration'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven { url 'https://repo.spring.io/milestone' }
|
|
if (version.endsWith('SNAPSHOT')) {
|
|
maven { url 'https://repo.spring.io/snapshot' }
|
|
}
|
|
|
|
// maven { url 'https://repo.spring.io/libs-staging-local' }
|
|
}
|
|
|
|
ext {
|
|
awaitilityVersion = '4.2.2'
|
|
awsSdkVersion = '2.20.162'
|
|
jacksonVersion = '2.15.4'
|
|
junitVersion = '5.11.0'
|
|
log4jVersion = '2.24.0'
|
|
servletApiVersion = '6.0.0'
|
|
springCloudAwsVersion = '3.0.5'
|
|
springIntegrationVersion = '6.0.9'
|
|
kinesisClientVersion = '2.5.8'
|
|
kinesisProducerVersion = '0.15.11'
|
|
testcontainersVersion = '1.20.1'
|
|
|
|
idPrefix = 'aws'
|
|
|
|
linkHomepage = 'https://github.com/spring-projects/spring-integration-aws'
|
|
linkCi = 'https://build.spring.io/browse/INTEXT'
|
|
linkIssue = 'https://github.com/spring-projects/spring-integration-aws/issues'
|
|
linkScmUrl = 'https://github.com/spring-projects/spring-integration-aws'
|
|
linkScmConnection = 'https://github.com/spring-projects/spring-integration-aws.git'
|
|
linkScmDevConnection = 'git@github.com:spring-projects/spring-integration-aws.git'
|
|
|
|
modifiedFiles =
|
|
files()
|
|
.from {
|
|
files(grgit.status().unstaged.modified)
|
|
.filter { f -> f.name.endsWith('.java') }
|
|
}
|
|
modifiedFiles.finalizeValueOnRead()
|
|
}
|
|
|
|
ext.javadocLinks = [
|
|
'https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/'
|
|
] as String[]
|
|
|
|
compileJava {
|
|
options.release = 17
|
|
}
|
|
|
|
java {
|
|
withJavadocJar()
|
|
withSourcesJar()
|
|
registerFeature('optional') {
|
|
usingSourceSet(sourceSets.main)
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
test {
|
|
resources {
|
|
srcDirs = ['src/test/resources', 'src/test/java']
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencyManagement {
|
|
resolutionStrategy {
|
|
cacheChangingModulesFor 0, 'seconds'
|
|
}
|
|
applyMavenExclusions = false
|
|
generatedPomCustomization {
|
|
enabled = false
|
|
}
|
|
imports {
|
|
mavenBom "io.awspring.cloud:spring-cloud-aws-dependencies:$springCloudAwsVersion"
|
|
mavenBom "software.amazon.awssdk:bom:$awsSdkVersion"
|
|
mavenBom "org.springframework.integration:spring-integration-bom:$springIntegrationVersion"
|
|
mavenBom "com.fasterxml.jackson:jackson-bom:$jacksonVersion"
|
|
mavenBom "org.junit:junit-bom:$junitVersion"
|
|
mavenBom "org.testcontainers:testcontainers-bom:$testcontainersVersion"
|
|
mavenBom "org.apache.logging.log4j:log4j-bom:$log4jVersion"
|
|
}
|
|
}
|
|
|
|
checkstyle {
|
|
configDirectory.set(rootProject.file('src/checkstyle'))
|
|
toolVersion = '10.18.1'
|
|
}
|
|
|
|
dependencies {
|
|
api 'org.springframework.integration:spring-integration-core'
|
|
api 'io.awspring.cloud:spring-cloud-aws-core'
|
|
api 'com.fasterxml.jackson.core:jackson-databind'
|
|
|
|
optionalApi 'io.awspring.cloud:spring-cloud-aws-sns'
|
|
optionalApi 'io.awspring.cloud:spring-cloud-aws-sqs'
|
|
optionalApi 'io.awspring.cloud:spring-cloud-aws-s3'
|
|
|
|
optionalApi 'org.springframework.integration:spring-integration-file'
|
|
optionalApi 'org.springframework.integration:spring-integration-http'
|
|
|
|
optionalApi 'software.amazon.awssdk:kinesis'
|
|
optionalApi 'software.amazon.awssdk:dynamodb'
|
|
optionalApi 'software.amazon.awssdk:s3-transfer-manager'
|
|
|
|
optionalApi "software.amazon.kinesis:amazon-kinesis-client:$kinesisClientVersion"
|
|
optionalApi "com.amazonaws:amazon-kinesis-producer:$kinesisProducerVersion"
|
|
|
|
optionalApi "jakarta.servlet:jakarta.servlet-api:$servletApiVersion"
|
|
|
|
testImplementation 'org.mockito:mockito-core:5.15.2'
|
|
testImplementation 'net.bytebuddy:byte-buddy:1.15.11'
|
|
testImplementation 'net.bytebuddy:byte-buddy-agent:1.15.11'
|
|
|
|
testImplementation 'org.springframework.integration:spring-integration-test'
|
|
testImplementation("org.awaitility:awaitility:$awaitilityVersion") {
|
|
exclude group: 'org.hamcrest'
|
|
}
|
|
testImplementation 'org.junit.jupiter:junit-jupiter-api'
|
|
testImplementation 'org.testcontainers:junit-jupiter'
|
|
testImplementation 'org.testcontainers:localstack'
|
|
|
|
testRuntimeOnly 'org.apache.logging.log4j:log4j-core'
|
|
testRuntimeOnly 'org.apache.logging.log4j:log4j-jcl'
|
|
testRuntimeOnly 'org.apache.logging.log4j:log4j-slf4j2-impl'
|
|
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
|
|
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
|
testRuntimeOnly 'software.amazon.awssdk:aws-crt-client'
|
|
}
|
|
|
|
eclipse.project.natures += 'org.springframework.ide.eclipse.core.springnature'
|
|
|
|
javadoc {
|
|
group = 'Documentation'
|
|
description = 'Generates the Javadoc API documentation.'
|
|
title = "${rootProject.description} ${version} API"
|
|
|
|
options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
|
|
options.author = true
|
|
options.header = project.description
|
|
options.overview = file('src/api/overview.html')
|
|
options.stylesheetFile = file('src/api/stylesheet.css')
|
|
options.splitIndex = true
|
|
options.links(project.ext.javadocLinks)
|
|
options.addStringOption('Xdoclint:none', '-quiet')
|
|
source = sourceSets.main.allJava
|
|
classpath = project.sourceSets.main.compileClasspath
|
|
destinationDir = file('build/api')
|
|
|
|
// suppress warnings due to cross-module @see and @link references;
|
|
// note that global 'api' task does display all warnings.
|
|
logging.captureStandardError LogLevel.INFO
|
|
logging.captureStandardOutput LogLevel.INFO // suppress "## warnings" message
|
|
}
|
|
|
|
// enable all compiler warnings; individual projects may customize further
|
|
ext.xLintArg = '-Xlint:all,-options'
|
|
[compileJava, compileTestJava]*.options*.compilerArgs = [xLintArg, '-parameters']
|
|
|
|
test {
|
|
maxHeapSize = '1024m'
|
|
useJUnitPlatform()
|
|
// suppress all console output during testing unless running `gradle -i`
|
|
logging.captureStandardOutput(LogLevel.INFO)
|
|
}
|
|
|
|
check.dependsOn javadoc
|
|
|
|
task docsZip(type: Zip) {
|
|
group = 'Distribution'
|
|
archiveClassifier = 'docs'
|
|
description = "Builds -${archiveClassifier} archive containing the JavaDoc api " +
|
|
"for deployment at static.springframework.org/spring-integration/docs."
|
|
|
|
from('.') {
|
|
include 'README.md'
|
|
}
|
|
|
|
from(javadoc) {
|
|
into 'api'
|
|
}
|
|
}
|
|
|
|
task distZip(type: Zip, dependsOn: docsZip) {
|
|
group = 'Distribution'
|
|
archiveClassifier = 'dist'
|
|
description = "Builds -${archiveClassifier} archive, containing all jars and docs, " +
|
|
"suitable for community download page."
|
|
|
|
ext.baseDir = "${project.name}-${project.version}";
|
|
|
|
from('src/dist') {
|
|
include 'license.txt'
|
|
include 'notice.txt'
|
|
into "${baseDir}"
|
|
}
|
|
|
|
from('.') {
|
|
include 'README.md'
|
|
into "${baseDir}"
|
|
}
|
|
|
|
into("${baseDir}/libs") {
|
|
from project.jar
|
|
from project.sourcesJar
|
|
from project.javadocJar
|
|
}
|
|
}
|
|
|
|
task dist(dependsOn: assemble) {
|
|
group = 'Distribution'
|
|
description = 'Builds -dist and -docs distribution archives.'
|
|
}
|
|
|
|
apply from: "${rootProject.projectDir}/publish-maven.gradle"
|