parent
e2e93887af
commit
02b2fcc6f0
|
@ -1,7 +1,7 @@
|
|||
apply plugin: 'io.spring.convention.spring-module'
|
||||
|
||||
dependencies {
|
||||
api platform(project(":spring-security-dependencies"))
|
||||
management platform(project(":spring-security-dependencies"))
|
||||
api project(':spring-security-core')
|
||||
api 'org.springframework:spring-aop'
|
||||
api 'org.springframework:spring-context'
|
||||
|
|
|
@ -2,7 +2,7 @@ apply plugin: 'io.spring.convention.spring-module'
|
|||
apply plugin: 'io.freefair.aspectj'
|
||||
|
||||
dependencies {
|
||||
api platform(project(":spring-security-dependencies"))
|
||||
management platform(project(":spring-security-dependencies"))
|
||||
api "org.aspectj:aspectjrt"
|
||||
api project(':spring-security-core')
|
||||
api 'org.springframework:spring-beans'
|
||||
|
|
|
@ -37,6 +37,7 @@ public abstract class AbstractSpringJavaPlugin implements Plugin<Project> {
|
|||
public final void apply(Project project) {
|
||||
PluginManager pluginManager = project.getPluginManager();
|
||||
pluginManager.apply(JavaPlugin.class);
|
||||
pluginManager.apply(ManagementConfigurationPlugin.class)
|
||||
if (project.file("src/main/groovy").exists()
|
||||
|| project.file("src/test/groovy").exists()
|
||||
|| project.file("src/integration-test/groovy").exists()) {
|
||||
|
|
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
* 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 io.spring.gradle.convention;
|
||||
|
||||
import org.gradle.api.Plugin;
|
||||
import org.gradle.api.Project;
|
||||
import org.gradle.api.artifacts.ConfigurationContainer;
|
||||
import org.gradle.api.plugins.JavaPlugin;
|
||||
import org.gradle.api.plugins.JavaTestFixturesPlugin;
|
||||
import org.gradle.api.plugins.PluginContainer;
|
||||
import org.gradle.api.publish.PublishingExtension;
|
||||
import org.gradle.api.publish.maven.MavenPublication;
|
||||
import org.gradle.api.publish.maven.plugins.MavenPublishPlugin;
|
||||
|
||||
import org.springframework.gradle.propdeps.PropDepsPlugin;
|
||||
|
||||
/**
|
||||
* Creates a Management configuration that is appropriate for adding a platform to that is not exposed externally. If
|
||||
* the JavaPlugin is applied, the compileClasspath, runtimeClasspath, testCompileClasspath, and testRuntimeClasspath
|
||||
* will extend from it.
|
||||
* @author Rob Winch
|
||||
*/
|
||||
public class ManagementConfigurationPlugin implements Plugin<Project> {
|
||||
|
||||
public static final String MANAGEMENT_CONFIGURATION_NAME = "management";
|
||||
|
||||
@Override
|
||||
public void apply(Project project) {
|
||||
ConfigurationContainer configurations = project.getConfigurations();
|
||||
configurations.create(MANAGEMENT_CONFIGURATION_NAME, (management) -> {
|
||||
management.setVisible(false);
|
||||
management.setCanBeConsumed(false);
|
||||
management.setCanBeResolved(false);
|
||||
|
||||
PluginContainer plugins = project.getPlugins();
|
||||
plugins.withType(JavaPlugin.class, (javaPlugin) -> {
|
||||
configurations.getByName(JavaPlugin.COMPILE_CLASSPATH_CONFIGURATION_NAME).extendsFrom(management);
|
||||
configurations.getByName(JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME).extendsFrom(management);
|
||||
configurations.getByName(JavaPlugin.TEST_COMPILE_CLASSPATH_CONFIGURATION_NAME).extendsFrom(management);
|
||||
configurations.getByName(JavaPlugin.TEST_RUNTIME_CLASSPATH_CONFIGURATION_NAME).extendsFrom(management);
|
||||
});
|
||||
plugins.withType(JavaTestFixturesPlugin.class, (javaTestFixturesPlugin) -> {
|
||||
configurations.getByName("testFixturesCompileClasspath").extendsFrom(management);
|
||||
configurations.getByName("testFixturesRuntimeClasspath").extendsFrom(management);
|
||||
});
|
||||
plugins.withType(MavenPublishPlugin.class, (mavenPublish) -> {
|
||||
PublishingExtension publishing = project.getExtensions().getByType(PublishingExtension.class);
|
||||
publishing.getPublications().withType(MavenPublication.class, (mavenPublication -> {
|
||||
mavenPublication.versionMapping((versions) ->
|
||||
versions.allVariants(versionMapping -> versionMapping.fromResolutionResult())
|
||||
);
|
||||
}));
|
||||
});
|
||||
plugins.withType(PropDepsPlugin.class, (propDepsPlugin -> {
|
||||
configurations.getByName("optional").extendsFrom(management);
|
||||
configurations.getByName("provided").extendsFrom(management);
|
||||
}));
|
||||
});
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
apply plugin: 'io.spring.convention.spring-module'
|
||||
|
||||
dependencies {
|
||||
api platform(project(":spring-security-dependencies"))
|
||||
management platform(project(":spring-security-dependencies"))
|
||||
api project(':spring-security-core')
|
||||
api project(':spring-security-web')
|
||||
api 'org.jasig.cas.client:cas-client-core'
|
||||
|
|
|
@ -9,7 +9,7 @@ repositories {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
api platform(project(":spring-security-dependencies"))
|
||||
management platform(project(":spring-security-dependencies"))
|
||||
// NB: Don't add other compile time dependencies to the config module as this breaks tooling
|
||||
api project(':spring-security-core')
|
||||
api 'org.springframework:spring-aop'
|
||||
|
|
|
@ -3,7 +3,7 @@ import java.util.concurrent.Callable
|
|||
apply plugin: 'io.spring.convention.spring-module'
|
||||
|
||||
dependencies {
|
||||
api platform(project(":spring-security-dependencies"))
|
||||
management platform(project(":spring-security-dependencies"))
|
||||
api project(':spring-security-crypto')
|
||||
api 'org.springframework:spring-aop'
|
||||
api 'org.springframework:spring-beans'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
apply plugin: 'io.spring.convention.spring-module'
|
||||
|
||||
dependencies {
|
||||
api platform(project(":spring-security-dependencies"))
|
||||
management platform(project(":spring-security-dependencies"))
|
||||
optional 'org.springframework:spring-jcl'
|
||||
optional 'org.bouncycastle:bcpkix-jdk15on'
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
apply plugin: 'io.spring.convention.spring-module'
|
||||
|
||||
dependencies {
|
||||
api platform(project(":spring-security-dependencies"))
|
||||
management platform(project(":spring-security-dependencies"))
|
||||
api project(':spring-security-core')
|
||||
api 'javax.xml.bind:jaxb-api'
|
||||
api 'org.springframework.data:spring-data-commons'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
apply plugin: 'io.spring.convention.spring-module'
|
||||
|
||||
dependencies {
|
||||
api platform(project(":spring-security-dependencies"))
|
||||
management platform(project(":spring-security-dependencies"))
|
||||
api project(':spring-security-core')
|
||||
api 'org.springframework:spring-beans'
|
||||
api 'org.springframework:spring-context'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
apply plugin: 'io.spring.convention.spring-module'
|
||||
|
||||
dependencies {
|
||||
api platform(project(":spring-security-dependencies"))
|
||||
management platform(project(":spring-security-dependencies"))
|
||||
api project(':spring-security-core')
|
||||
api 'org.springframework:spring-beans'
|
||||
api 'org.springframework:spring-context'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
apply plugin: 'io.spring.convention.spring-module'
|
||||
|
||||
dependencies {
|
||||
api platform(project(":spring-security-dependencies"))
|
||||
management platform(project(":spring-security-dependencies"))
|
||||
api project(':spring-security-core')
|
||||
api project(':spring-security-oauth2-core')
|
||||
api project(':spring-security-web')
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
apply plugin: 'io.spring.convention.spring-module'
|
||||
|
||||
dependencies {
|
||||
api platform(project(":spring-security-dependencies"))
|
||||
management platform(project(":spring-security-dependencies"))
|
||||
api project(':spring-security-core')
|
||||
api 'org.springframework:spring-core'
|
||||
api 'org.springframework:spring-web'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
apply plugin: 'io.spring.convention.spring-module'
|
||||
|
||||
dependencies {
|
||||
api platform(project(":spring-security-dependencies"))
|
||||
management platform(project(":spring-security-dependencies"))
|
||||
api project(':spring-security-core')
|
||||
api project(':spring-security-oauth2-core')
|
||||
api 'org.springframework:spring-core'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
apply plugin: 'io.spring.convention.spring-module'
|
||||
|
||||
dependencies {
|
||||
api platform(project(":spring-security-dependencies"))
|
||||
management platform(project(":spring-security-dependencies"))
|
||||
api project(':spring-security-core')
|
||||
api project(':spring-security-oauth2-core')
|
||||
api project(':spring-security-web')
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
apply plugin: 'io.spring.convention.spring-module'
|
||||
|
||||
dependencies {
|
||||
api platform(project(":spring-security-dependencies"))
|
||||
management platform(project(":spring-security-dependencies"))
|
||||
api project(':spring-security-core')
|
||||
api project(':spring-security-web')
|
||||
api('com.google.inject:guice') {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
apply plugin: 'io.spring.convention.spring-module'
|
||||
|
||||
dependencies {
|
||||
api platform(project(":spring-security-dependencies"))
|
||||
management platform(project(":spring-security-dependencies"))
|
||||
api project(':spring-security-core')
|
||||
api 'org.springframework:spring-aop'
|
||||
api 'org.springframework:spring-beans'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
apply plugin: 'io.spring.convention.spring-module'
|
||||
|
||||
dependencies {
|
||||
api platform(project(":spring-security-dependencies"))
|
||||
management platform(project(":spring-security-dependencies"))
|
||||
api project(':spring-security-core')
|
||||
api 'io.rsocket:rsocket-core'
|
||||
optional project(':spring-security-oauth2-resource-server')
|
||||
|
|
|
@ -41,7 +41,7 @@ compileOpensaml4MainJava {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
api platform(project(":spring-security-dependencies"))
|
||||
management platform(project(":spring-security-dependencies"))
|
||||
api project(':spring-security-web')
|
||||
api "org.opensaml:opensaml-core"
|
||||
api "org.opensaml:opensaml-saml-api"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
apply plugin: 'io.spring.convention.spring-module'
|
||||
|
||||
dependencies {
|
||||
api platform(project(":spring-security-dependencies"))
|
||||
management platform(project(":spring-security-dependencies"))
|
||||
api project(':spring-security-acl')
|
||||
api project(':spring-security-core')
|
||||
api project(':spring-security-web')
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
apply plugin: 'io.spring.convention.spring-module'
|
||||
|
||||
dependencies {
|
||||
api platform(project(":spring-security-dependencies"))
|
||||
management platform(project(":spring-security-dependencies"))
|
||||
api project(':spring-security-core')
|
||||
api project(':spring-security-web')
|
||||
api 'org.springframework:spring-core'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
apply plugin: 'io.spring.convention.spring-module'
|
||||
|
||||
dependencies {
|
||||
api platform(project(":spring-security-dependencies"))
|
||||
management platform(project(":spring-security-dependencies"))
|
||||
api project(':spring-security-core')
|
||||
api 'org.springframework:spring-core'
|
||||
api 'org.springframework:spring-aop'
|
||||
|
|
Loading…
Reference in New Issue