Skip to content

Commit

Permalink
Update to Gradle 7.3.3
Browse files Browse the repository at this point in the history
Issue gh-610
Closes gh-613
Closes gh-581
  • Loading branch information
jzheaux committed Feb 2, 2022
1 parent 02ee328 commit 28f2ca6
Show file tree
Hide file tree
Showing 221 changed files with 10,078 additions and 2,323 deletions.
207 changes: 0 additions & 207 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ buildscript {
}
dependencies {
classpath "com.github.ben-manes:gradle-versions-plugin:0.17.0"
classpath("org.springframework.build.gradle:propdeps-plugin:0.0.7")
classpath('org.asciidoctor:asciidoctor-gradle-plugin:1.5.1')
classpath("io.spring.gradle:spring-io-plugin:0.0.6.RELEASE")
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.12.0"
Expand All @@ -21,210 +20,4 @@ buildscript {
}
}

apply plugin: 'org.asciidoctor.gradle.asciidoctor'

ext.GRADLE_SCRIPT_DIR = "${rootProject.projectDir}/gradle"
apply from: "${GRADLE_SCRIPT_DIR}/finalize-deploy.gradle"
ext.JAVA_MODULE_SCRIPT = "${GRADLE_SCRIPT_DIR}/java-module.gradle"
ext.MAVEN_DEPLOYMENT_SCRIPT = "${GRADLE_SCRIPT_DIR}/maven-deployment.gradle"
ext.JAVA_SCRIPT = "${GRADLE_SCRIPT_DIR}/java.gradle"
ext.RELEASE_CHECKS_SCRIPT = "${GRADLE_SCRIPT_DIR}/release-checks.gradle"
ext.SPRING_SNAPSHOT_TEST_SCRIPT = "${GRADLE_SCRIPT_DIR}/spring-snapshot-test.gradle"

ext.coreModules = subprojects.findAll { p-> (!p.name.equals('spring-build-src') && !p.name.contains("test") && !p.name.contains("sample") && !p.name.contains("sandbox")) || p.name.contains("spring-ldap-test") }

allprojects {
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'java'
apply plugin: "com.github.ben-manes.versions"

group = "org.springframework.ldap"

ext.releaseBuild = version.endsWith('RELEASE')
ext.snapshotBuild = version.endsWith('SNAPSHOT')

ext.javadocLinks = [
"https://docs.oracle.com/javase/7/docs/api/",
"https://docs.spring.io/spring/docs/3.2.x/javadoc-api/",
"https://logging.apache.org/log4j/1.2/apidocs/",
"https://commons.apache.org/proper/commons-logging/apidocs/",
"https://commons.apache.org/proper/commons-dbcp/apidocs/",
"https://commons.apache.org/proper/commons-pool/apidocs/",
"http://junit.sourceforge.net/javadoc/",
] as String[]
}


configure(subprojects) {
apply plugin: 'propdeps'
apply plugin: 'propdeps-maven'
apply plugin: 'propdeps-idea'
apply plugin: 'propdeps-eclipse'
apply plugin: 'groovy'
apply plugin: "merge"
}

configure(coreModules) {
apply from: JAVA_MODULE_SCRIPT
}

configure(subprojects - coreModules) {
tasks.findByPath("artifactoryPublish")?.enabled = false
tasks.findByPath("uploadArchives")?.enabled = false
}

description = "Spring LDAP"

configurations.archives.artifacts.clear()
apply from: "${GRADLE_SCRIPT_DIR}/deploy-docs.gradle"
apply from: "${GRADLE_SCRIPT_DIR}/deploy-schema.gradle"

asciidoctor {
outputDir = new File("$buildDir/docs")
options = [
eruby: 'erubis',
attributes: [
copycss : '',
icons : 'font',
'source-highlighter': 'prettify',
sectanchors : '',
toc2: '',
idprefix: '',
idseparator: '-',
doctype: 'book',
numbered: '',
'spring-ldap-version' : project.version,
revnumber : project.version
]
]
}

task api(type: Javadoc) {
group = "Documentation"
description = "Generates aggregated Javadoc API documentation."
title = "${rootProject.description} ${version} API"

options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
options.author = true
options.header = rootProject.description
options.splitIndex = true
options.links(project.ext.javadocLinks)

maxMemory = "1536m"
destinationDir = new File(buildDir, "api")

source coreModules*.javadoc*.source
classpath = files(coreModules*.javadoc*.classpath)
}

task docsZip(type: Zip, dependsOn: asciidoctor) {
group = "Distribution"
baseName = "spring-ldap"
classifier = "docs"
description = "Builds -${classifier} archive containing api and reference " +
"for deployment at https://docs.spring.io/spring-ldap/docs."

from("src/dist") {
include "changelog.txt"
}

from (api) {
into "apidocs"
}

from (new File(asciidoctor.outputDir, "html5")) {
include "*.html"
into "reference"
}
}

task schemaZip(type: Zip) {
group = 'Distribution'
baseName = rootProject.name
classifier = 'schema'
description = "Builds -${classifier} archive containing all " +
"XSDs for deployment at static.springframework.org/schema."

coreModules.each { module ->
def Properties schemas = new Properties();

module.sourceSets.main.resources.find {
it.path.endsWith('META-INF/spring.schemas')
}?.withInputStream { schemas.load(it) }

for (def key : schemas.keySet()) {
def shortName = key.replaceAll(/http.*schema.(.*).spring-.*/, '$1')
assert shortName != key
File xsdFile = module.sourceSets.main.resources.find {
it.path.endsWith(schemas.get(key))
}
assert xsdFile != null
into (shortName) {
duplicatesStrategy 'exclude'
from xsdFile.path
}
}
}
}


task distZip(type: Zip, dependsOn: [docsZip]) {
dependsOn subprojects*.tasks*.matching { task -> task.name == 'assemble' }

group = "Distribution"
baseName = "spring-ldap"
classifier = "dist"
description = "Builds -${classifier} archive, containing all jars and docs, " +
"suitable for community download page."

ext.baseDir = "${baseName}-${project.version}"


from("src/dist") {
include "readme.md"
include "license.txt"
include "notice.txt"
into "${baseDir}"
expand(copyright: new Date().format("yyyy"), version: project.version)
}

from(zipTree(docsZip.archivePath)) {
into "${baseDir}/docs"
}

coreModules.each { subproject ->
into ("${baseDir}/libs") {
from subproject.jar
if (subproject.tasks.findByPath("sourcesJar")) {
from subproject.sourcesJar
}
if (subproject.tasks.findByPath("javadocJar")) {
from subproject.javadocJar
}
}
}
}

artifacts {
archives docsZip
archives distZip
archives schemaZip
}


if (project.hasProperty('artifactoryUsername')) {
allprojects { project ->
project.repositories { repos ->
all { repo ->
if (!repo.url.toString().startsWith("https://repo.spring.io/")) {
return;
}
repo.credentials {
username = artifactoryUsername
password = artifactoryPassword
}
}
}
}
}
116 changes: 113 additions & 3 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,117 @@
description = "Exposes gradle buildSrc for IDE support"
apply plugin: "groovy"
plugins {
id "java-gradle-plugin"
id "java"
id "groovy"
id 'com.apollographql.apollo' version '2.4.5'
}

sourceCompatibility = JavaVersion.VERSION_11

repositories {
gradlePluginPortal()
mavenCentral()
maven { url 'https://repo.spring.io/plugins-release/' }
}

sourceSets {
main {
java {
srcDirs = []
}
groovy {
srcDirs += ["src/main/java"]
}
}
}

gradlePlugin {
plugins {
checkAntoraVersion {
id = "org.springframework.antora.check-version"
implementationClass = "org.springframework.gradle.antora.CheckAntoraVersionPlugin"
}
trang {
id = "trang"
implementationClass = "trang.TrangPlugin"
}
locks {
id = "locks"
implementationClass = "lock.GlobalLockPlugin"
}
managementConfiguration {
id = "io.spring.convention.management-configuration"
implementationClass = "io.spring.gradle.convention.ManagementConfigurationPlugin"
}
updateDependencies {
id = "org.springframework.security.update-dependencies"
implementationClass = "org.springframework.security.convention.versions.UpdateDependenciesPlugin"
}
sagan {
id = "org.springframework.security.sagan"
implementationClass = "org.springframework.gradle.sagan.SaganPlugin"
}
githubMilestone {
id = "org.springframework.github.milestone"
implementationClass = "org.springframework.gradle.github.milestones.GitHubMilestonePlugin"
}
githubChangelog {
id = "org.springframework.github.changelog"
implementationClass = "org.springframework.gradle.github.changelog.GitHubChangelogPlugin"
}
githubRelease {
id = "org.springframework.github.release"
implementationClass = "org.springframework.gradle.github.release.GitHubReleasePlugin"
}
s101 {
id = "s101"
implementationClass = "s101.S101Plugin"
}
}
}

configurations {
implementation {
exclude module: 'groovy-all'
}
}

dependencies {
implementation gradleApi()
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.thaiopensource:trang:20091111'
implementation 'net.sourceforge.saxon:saxon:9.1.0.8'
implementation 'org.yaml:snakeyaml:1.30'
implementation localGroovy()

implementation 'io.github.gradle-nexus:publish-plugin:1.1.0'
implementation 'io.projectreactor:reactor-core:3.4.11'
implementation 'org.gretty:gretty:4.0.0'
implementation 'com.apollographql.apollo:apollo-runtime:2.4.5'
implementation 'com.github.ben-manes:gradle-versions-plugin:0.38.0'
implementation 'com.github.spullara.mustache.java:compiler:0.9.4'
implementation 'io.spring.javaformat:spring-javaformat-gradle-plugin:0.0.15'
implementation 'io.spring.nohttp:nohttp-gradle:0.0.10'
implementation 'net.sourceforge.htmlunit:htmlunit:2.37.0'
implementation 'org.hidetake:gradle-ssh-plugin:2.10.1'
implementation 'org.jfrog.buildinfo:build-info-extractor-gradle:4.26.1'
implementation 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.7.1'

testImplementation platform('org.junit:junit-bom:5.8.1')
testImplementation "org.junit.jupiter:junit-jupiter-api"
testImplementation "org.junit.jupiter:junit-jupiter-params"
testImplementation "org.junit.jupiter:junit-jupiter-engine"
testImplementation 'org.apache.commons:commons-io:1.3.2'
testImplementation 'org.assertj:assertj-core:3.13.2'
testImplementation 'org.mockito:mockito-core:3.12.4'
testImplementation 'org.mockito:mockito-junit-jupiter:3.12.4'
testImplementation "com.squareup.okhttp3:mockwebserver:3.14.9"
}


tasks.named('test', Test).configure {
onlyIf { !project.hasProperty("buildSrc.skipTests") }
useJUnitPlatform()
jvmArgs(
'--add-opens', 'java.base/java.lang=ALL-UNNAMED',
'--add-opens', 'java.base/java.util=ALL-UNNAMED'
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
mutation CreateIssueInput($assigneeId: ID!, $labelIds: [ID!], $milestoneId: ID!, $repositoryId: ID!, $title: String!) {
createIssue(input: {assigneeIds: [$assigneeId], labelIds: $labelIds, milestoneId: $milestoneId, projectIds: [], repositoryId: $repositoryId, title: $title}) {
issue {
number
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
query FindCreateIssueInput($owner: String!, $name: String!, $labelQuery: String, $milestoneName: String) {
repository(owner: $owner, name: $name) {
id
labels(query: $labelQuery, first: 1) {
nodes {
id
name
}
}
milestones(query: $milestoneName, states: [OPEN], first: 1) {
nodes {
id
title
}
}
}
viewer {
id
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
query RateLimit {
rateLimit {
limit
cost
remaining
resetAt
}
}

Large diffs are not rendered by default.

0 comments on commit 28f2ca6

Please sign in to comment.