-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
47 changed files
with
218 additions
and
163 deletions.
There are no files selected for viewing
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
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,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
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
59 changes: 0 additions & 59 deletions
59
buildSrc/src/main/groovy/io/spring/gradle/convention/ManagementConfigurationPlugin.java
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
buildSrc/src/main/groovy/io/spring/gradle/convention/OssrhPlugin.groovy
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
43 changes: 43 additions & 0 deletions
43
buildSrc/src/main/java/org/springframework/gradle/propdeps/PropDepsEclipsePlugin.groovy
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* Copyright 2002-2021 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.springframework.gradle.propdeps | ||
|
||
|
||
import org.gradle.api.Plugin | ||
import org.gradle.api.Project | ||
import org.gradle.plugins.ide.eclipse.EclipsePlugin | ||
|
||
/** | ||
* Plugin to allow optional and provided dependency configurations to work with the | ||
* standard gradle 'eclipse' plugin | ||
* | ||
* @author Phillip Webb | ||
*/ | ||
class PropDepsEclipsePlugin implements Plugin<Project> { | ||
|
||
public void apply(Project project) { | ||
project.plugins.apply(PropDepsPlugin) | ||
project.plugins.apply(EclipsePlugin) | ||
|
||
project.eclipse { | ||
classpath { | ||
plusConfigurations += [project.configurations.provided, project.configurations.optional] | ||
} | ||
} | ||
} | ||
|
||
} |
46 changes: 46 additions & 0 deletions
46
buildSrc/src/main/java/org/springframework/gradle/propdeps/PropDepsIdeaPlugin.groovy
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Copyright 2002-2021 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.springframework.gradle.propdeps | ||
|
||
|
||
import org.gradle.api.Plugin | ||
import org.gradle.api.Project | ||
import org.gradle.plugins.ide.idea.IdeaPlugin | ||
|
||
/** | ||
* Plugin to allow optional and provided dependency configurations to work with the | ||
* standard gradle 'idea' plugin | ||
* | ||
* @author Phillip Webb | ||
* @author Brian Clozel | ||
* @link https://youtrack.jetbrains.com/issue/IDEA-107046 | ||
* @link https://youtrack.jetbrains.com/issue/IDEA-117668 | ||
*/ | ||
class PropDepsIdeaPlugin implements Plugin<Project> { | ||
|
||
public void apply(Project project) { | ||
project.plugins.apply(PropDepsPlugin) | ||
project.plugins.apply(IdeaPlugin) | ||
project.idea.module { | ||
// IDEA internally deals with 4 scopes : COMPILE, TEST, PROVIDED, RUNTIME | ||
// but only PROVIDED seems to be picked up | ||
scopes.PROVIDED.plus += [project.configurations.provided] | ||
scopes.PROVIDED.plus += [project.configurations.optional] | ||
} | ||
} | ||
|
||
} |
76 changes: 76 additions & 0 deletions
76
buildSrc/src/main/java/org/springframework/gradle/propdeps/PropDepsPlugin.groovy
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 |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/* | ||
* Copyright 2002-2021 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.springframework.gradle.propdeps | ||
|
||
|
||
import org.gradle.api.Plugin | ||
import org.gradle.api.Project | ||
import org.gradle.api.artifacts.Configuration | ||
import org.gradle.api.plugins.JavaLibraryPlugin | ||
import org.gradle.api.plugins.JavaPlugin | ||
import org.gradle.api.tasks.javadoc.Javadoc | ||
|
||
/** | ||
* Plugin to allow 'optional' and 'provided' dependency configurations | ||
* | ||
* As stated in the maven documentation, provided scope "is only available on the compilation and test classpath, | ||
* and is not transitive". | ||
* | ||
* This plugin creates two new configurations, and each one: | ||
* <ul> | ||
* <li>is a parent of the compile configuration</li> | ||
* <li>is not visible, not transitive</li> | ||
* <li>all dependencies are excluded from the default configuration</li> | ||
* </ul> | ||
* | ||
* @author Phillip Webb | ||
* @author Brian Clozel | ||
* @author Rob Winch | ||
* | ||
* @see <a href="https://www.gradle.org/docs/current/userguide/java_plugin.html#N121CF">Maven documentation</a> | ||
* @see <a href="https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope">Gradle configurations</a> | ||
* @see PropDepsEclipsePlugin | ||
* @see PropDepsIdeaPlugin | ||
*/ | ||
class PropDepsPlugin implements Plugin<Project> { | ||
|
||
public void apply(Project project) { | ||
project.plugins.apply(JavaPlugin) | ||
|
||
Configuration provided = addConfiguration(project, "provided") | ||
Configuration optional = addConfiguration(project, "optional") | ||
|
||
Javadoc javadoc = project.tasks.getByName(JavaPlugin.JAVADOC_TASK_NAME) | ||
javadoc.classpath = javadoc.classpath.plus(provided).plus(optional) | ||
} | ||
|
||
private Configuration addConfiguration(Project project, String name) { | ||
Configuration configuration = project.configurations.create(name) | ||
configuration.extendsFrom(project.configurations.implementation) | ||
project.plugins.withType(JavaLibraryPlugin, { | ||
configuration.extendsFrom(project.configurations.api) | ||
}) | ||
|
||
project.sourceSets.all { | ||
compileClasspath += configuration | ||
runtimeClasspath += configuration | ||
} | ||
|
||
return configuration | ||
} | ||
|
||
} |
1 change: 0 additions & 1 deletion
1
buildSrc/src/main/resources/META-INF/gradle-plugins/io.spring.convention.ossrh.properties
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 |
---|---|---|
|
@@ -3,7 +3,6 @@ plugins { | |
} | ||
|
||
apply plugin: 'java' | ||
apply plugin: 'propdeps' | ||
|
||
repositories { | ||
mavenCentral() | ||
|
Oops, something went wrong.