-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cd8c2b3
commit 2312e53
Showing
6 changed files
with
47 additions
and
146 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
buildscript { | ||
ext.kotlinVersion = '1.7.20' | ||
ext.isCI = System.getenv('GITHUB_ACTION') || System.getenv('bamboo_buildKey') | ||
ext.isCI = System.getenv('GITHUB_ACTION') | ||
repositories { | ||
mavenCentral() | ||
gradlePluginPortal() | ||
|
@@ -19,24 +19,15 @@ plugins { | |
id 'base' | ||
id 'project-report' | ||
id 'idea' | ||
id 'org.sonarqube' version '4.3.0.3225' | ||
id 'org.ajoberstar.grgit' version '4.0.1' apply false | ||
id 'org.ajoberstar.grgit' version '4.1.1' | ||
id 'io.spring.nohttp' version '0.0.11' | ||
id 'io.spring.dependency-management' version '1.0.10.RELEASE' apply false | ||
id 'com.jfrog.artifactory' version '4.33.1' apply false | ||
id 'io.spring.dependency-management' version '1.1.4' apply false | ||
id 'org.asciidoctor.jvm.pdf' version '3.3.2' | ||
id 'org.asciidoctor.jvm.gems' version '3.3.2' | ||
id 'org.asciidoctor.jvm.convert' version '3.3.2' | ||
} | ||
|
||
apply plugin: 'io.spring.nohttp' | ||
|
||
def gitPresent = new File('.git').exists() | ||
|
||
if(gitPresent) { | ||
apply plugin: 'org.ajoberstar.grgit' | ||
} | ||
|
||
description = 'Spring for Apache Kafka' | ||
|
||
ext { | ||
|
@@ -46,18 +37,21 @@ ext { | |
linkScmUrl = 'https://github.com/spring-projects/spring-kafka' | ||
linkScmConnection = 'https://github.com/spring-projects/spring-kafka.git' | ||
linkScmDevConnection = '[email protected]:spring-projects/spring-kafka.git' | ||
springAsciidoctorBackendsVersion = '0.0.3' | ||
springAsciidoctorBackendsVersion = '0.0.7' | ||
|
||
javadocLinks = [ | ||
'https://docs.oracle.com/en/java/javase/17/docs/api/', | ||
'https://docs.spring.io/spring-framework/docs/current/javadoc-api/' | ||
] as String[] | ||
|
||
|
||
if (gitPresent) { | ||
modifiedFiles = | ||
files(grgit.status().unstaged.modified).filter{ f -> f.name.endsWith('.java') || f.name.endsWith('.kt') } | ||
} | ||
modifiedFiles = | ||
files() | ||
.from { | ||
files(grgit.status().unstaged.modified) | ||
.filter { f -> f.name.endsWith('.java') || f.name.endsWith('.kt') } | ||
} | ||
modifiedFiles.finalizeValueOnRead() | ||
|
||
assertjVersion = '3.24.2' | ||
awaitilityVersion = '4.2.0' | ||
|
@@ -84,13 +78,13 @@ ext { | |
|
||
idPrefix = 'kafka' | ||
|
||
javaProjects = subprojects - project(':spring-kafka-bom') | ||
javaProjects = subprojects - project(':spring-kafka-bom') - project(':spring-kafka-docs') | ||
|
||
} | ||
|
||
nohttp { | ||
source.include '**/src/**' | ||
source.exclude '**/*.gif', '**/*.ks' | ||
source.exclude '**/*.gif', '**/*.ks', '**/.gradle/**' | ||
} | ||
|
||
allprojects { | ||
|
@@ -120,7 +114,6 @@ allprojects { | |
|
||
repositories { | ||
mavenCentral() | ||
maven { url 'https://repo.spring.io/release' } | ||
maven { url 'https://repo.spring.io/milestone' } | ||
if (version.endsWith('SNAPSHOT')) { | ||
maven { url 'https://repo.spring.io/snapshot' } | ||
|
@@ -136,7 +129,6 @@ configure(javaProjects) { subproject -> | |
apply from: "${rootProject.projectDir}/gradle/publish-maven.gradle" | ||
apply plugin: 'eclipse' | ||
apply plugin: 'idea' | ||
apply plugin: 'jacoco' | ||
apply plugin: 'checkstyle' | ||
apply plugin: 'kotlin' | ||
apply plugin: 'kotlin-spring' | ||
|
@@ -147,9 +139,6 @@ configure(javaProjects) { subproject -> | |
registerFeature('optional') { | ||
usingSourceSet(sourceSets.main) | ||
} | ||
registerFeature('provided') { | ||
usingSourceSet(sourceSets.main) | ||
} | ||
} | ||
|
||
compileJava { | ||
|
@@ -170,10 +159,6 @@ configure(javaProjects) { subproject -> | |
|
||
eclipse.project.natures += 'org.springframework.ide.eclipse.core.springnature' | ||
|
||
jacoco { | ||
toolVersion = '0.8.10' | ||
} | ||
|
||
// dependencies that are common across all java projects | ||
dependencies { | ||
implementation "com.google.code.findbugs:jsr305:$googleJsr305Version" | ||
|
@@ -208,10 +193,6 @@ configure(javaProjects) { subproject -> | |
} | ||
|
||
maxHeapSize = '1536m' | ||
// jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=127.0.0.1:8111' | ||
jacoco { | ||
destinationFile = file("$buildDir/jacoco.exec") | ||
} | ||
useJUnitPlatform() | ||
|
||
} | ||
|
@@ -221,39 +202,19 @@ configure(javaProjects) { subproject -> | |
toolVersion = '10.8.0' | ||
} | ||
|
||
jacocoTestReport { | ||
onlyIf { System.properties['sonar.host.url'] } | ||
dependsOn test | ||
reports { | ||
xml.required = true | ||
csv.required = false | ||
html.required = false | ||
} | ||
} | ||
|
||
rootProject.tasks['sonarqube'].dependsOn jacocoTestReport | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
suppressAllPomMetadataWarnings() | ||
from components.java | ||
pom.withXml { | ||
def pomDeps = asNode().dependencies.first() | ||
subproject.configurations.providedImplementation.allDependencies.each { dep -> | ||
pomDeps.remove(pomDeps.'*'.find { it.artifactId.text() == dep.name }) | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
task updateCopyrights { | ||
onlyIf { !isCI } | ||
if (gitPresent) { | ||
inputs.files(modifiedFiles.filter { f -> f.path.contains(subproject.name) }) | ||
} | ||
outputs.dir('build') | ||
inputs.files(modifiedFiles.filter { f -> f.path.contains(subproject.name) }) | ||
outputs.dir('build/classes') | ||
|
||
doLast { | ||
def now = Calendar.instance.get(Calendar.YEAR) as String | ||
|
@@ -358,9 +319,7 @@ project ('spring-kafka') { | |
testImplementation ('io.micrometer:micrometer-tracing-integration-test') { | ||
exclude group: "org.mockito" | ||
} | ||
|
||
} | ||
|
||
} | ||
|
||
project('spring-kafka-bom') { | ||
|
@@ -386,10 +345,6 @@ project('spring-kafka-bom') { | |
} | ||
} | ||
} | ||
|
||
sonarqube { | ||
skipProject = true | ||
} | ||
} | ||
|
||
project ('spring-kafka-test') { | ||
|
@@ -424,39 +379,6 @@ project ('spring-kafka-test') { | |
} | ||
} | ||
|
||
project ('spring-kafka-docs') { | ||
description = 'Spring Kafka Code Snippets For Docs' | ||
|
||
dependencies { | ||
api "org.springframework.boot:spring-boot-starter:$springBootVersion" | ||
api project (':spring-kafka') | ||
optionalApi 'org.jetbrains.kotlin:kotlin-stdlib' | ||
optionalApi 'com.fasterxml.jackson.core:jackson-core' | ||
optionalApi 'com.fasterxml.jackson.core:jackson-databind' | ||
} | ||
|
||
compileKotlin { | ||
kotlinOptions { | ||
jvmTarget = '17' | ||
} | ||
} | ||
|
||
sonarqube { | ||
skipProject = true | ||
} | ||
|
||
} | ||
|
||
sonarqube { | ||
properties { | ||
property 'sonar.links.homepage', linkHomepage | ||
property 'sonar.links.ci', linkCi | ||
property 'sonar.links.issue', linkIssue | ||
property 'sonar.links.scm', linkScmUrl | ||
property 'sonar.links.scm_dev', linkScmDevConnection | ||
} | ||
} | ||
|
||
configurations { | ||
asciidoctorExtensions | ||
micrometerDocs | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'com.jfrog.artifactory' | ||
|
||
publishing { | ||
publications { | ||
|
@@ -27,17 +26,23 @@ publishing { | |
developerConnection = linkScmDevConnection | ||
} | ||
developers { | ||
developer { | ||
id = 'sobychacko' | ||
name = 'Soby Chacko' | ||
email = '[email protected]' | ||
roles = ['project lead'] | ||
} | ||
developer { | ||
id = 'garyrussell' | ||
name = 'Gary Russell' | ||
email = '[email protected]' | ||
roles = ["project lead"] | ||
email = '[email protected]' | ||
roles = ['project founder and project lead emeritus'] | ||
} | ||
developer { | ||
id = 'abilan' | ||
id = 'artembilan' | ||
name = 'Artem Bilan' | ||
email = 'abilan@vmware.com' | ||
roles = ["contributor"] | ||
email = 'artem.bilan@broadcom.com' | ||
roles = ['contributor'] | ||
} | ||
} | ||
issueManagement { | ||
|
@@ -56,8 +61,3 @@ publishing { | |
} | ||
} | ||
} | ||
|
||
artifactoryPublish { | ||
dependsOn build | ||
publications(publishing.publications.mavenJava) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,25 @@ | ||
jar { | ||
enabled = false | ||
} | ||
apply plugin: 'java' | ||
apply plugin: 'eclipse' | ||
apply plugin: 'idea' | ||
apply plugin: 'kotlin' | ||
apply plugin: 'kotlin-spring' | ||
|
||
sourcesJar { | ||
enabled = false | ||
} | ||
description = 'Spring Kafka Docs module' | ||
|
||
javadocJar { | ||
enabled = false | ||
dependencies { | ||
implementation "org.springframework.boot:spring-boot-starter:$springBootVersion" | ||
implementation project (':spring-kafka') | ||
implementation 'org.jetbrains.kotlin:kotlin-stdlib' | ||
implementation 'com.fasterxml.jackson.core:jackson-core' | ||
implementation 'com.fasterxml.jackson.core:jackson-databind' | ||
} | ||
|
||
publishMavenJavaPublicationToMavenLocal { | ||
enabled = false | ||
compileJava { | ||
options.release = 17 | ||
} | ||
|
||
compileKotlin { | ||
kotlinOptions { | ||
jvmTarget = '17' | ||
} | ||
} |