forked from spring-projects/spring-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Polish .gradle file formatting to use tabs
Replace spaces with tabs for consistency with Java source code
- Loading branch information
Showing
8 changed files
with
1,069 additions
and
1,069 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
import org.gradle.plugins.ide.eclipse.model.ProjectDependency | ||
|
||
eclipse.classpath.file.whenMerged { classpath -> | ||
// servlet-api (2.5) and tomcat-servlet-api (3.0) classpath entries should not be | ||
// exported to dependent projects in Eclipse to avoid false compilation errors due | ||
// to changing APIs across these versions | ||
classpath.entries.findAll { entry -> entry.path.contains('servlet-api') }*.exported = false | ||
// servlet-api (2.5) and tomcat-servlet-api (3.0) classpath entries should not be | ||
// exported to dependent projects in Eclipse to avoid false compilation errors due | ||
// to changing APIs across these versions | ||
classpath.entries.findAll { entry -> entry.path.contains('servlet-api') }*.exported = false | ||
|
||
// GRADLE-1116 | ||
def regexp = /.*?\/([^\/]+)\/build\/[^\/]+\/(?:main|test)/ // only match those that end in main or test (avoids removing necessary entries like build/classes/jaxb) | ||
def projectOutputDependencies = classpath.entries.findAll { entry -> entry.path =~ regexp } | ||
projectOutputDependencies.each { entry -> | ||
def matcher = (entry.path =~ regexp) | ||
if(matcher) { | ||
def projectName = matcher[0][1] | ||
def path = "/${projectName}" | ||
if(!classpath.entries.find { e -> e instanceof ProjectDependency && e.path == path }) { | ||
def dependency = new ProjectDependency(path, project(":${projectName}").path) | ||
dependency.exported = true | ||
classpath.entries.add(dependency) | ||
} | ||
classpath.entries.remove(entry) | ||
} | ||
} | ||
classpath.entries.removeAll { entry -> (entry.path =~ /(?!.*?repack.*\.jar).*?\/([^\/]+)\/build\/libs\/[^\/]+\.jar/) } | ||
} | ||
// GRADLE-1116 | ||
def regexp = /.*?\/([^\/]+)\/build\/[^\/]+\/(?:main|test)/ // only match those that end in main or test (avoids removing necessary entries like build/classes/jaxb) | ||
def projectOutputDependencies = classpath.entries.findAll { entry -> entry.path =~ regexp } | ||
projectOutputDependencies.each { entry -> | ||
def matcher = (entry.path =~ regexp) | ||
if(matcher) { | ||
def projectName = matcher[0][1] | ||
def path = "/${projectName}" | ||
if(!classpath.entries.find { e -> e instanceof ProjectDependency && e.path == path }) { | ||
def dependency = new ProjectDependency(path, project(":${projectName}").path) | ||
dependency.exported = true | ||
classpath.entries.add(dependency) | ||
} | ||
classpath.entries.remove(entry) | ||
} | ||
} | ||
classpath.entries.removeAll { entry -> (entry.path =~ /(?!.*?repack.*\.jar).*?\/([^\/]+)\/build\/libs\/[^\/]+\.jar/) } | ||
} |
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 |
---|---|---|
|
@@ -7,54 +7,54 @@ ext.optional = { optionalDeps << it } | |
ext.provided = { providedDeps << it } | ||
|
||
install { | ||
repositories.mavenInstaller { | ||
customizePom(pom, project) | ||
} | ||
repositories.mavenInstaller { | ||
customizePom(pom, project) | ||
} | ||
} | ||
|
||
def customizePom(pom, gradleProject) { | ||
pom.whenConfigured { generatedPom -> | ||
// respect 'optional' and 'provided' dependencies | ||
gradleProject.optionalDeps.each { dep -> | ||
generatedPom.dependencies.findAll { it.artifactId == dep.name }*.optional = true | ||
} | ||
gradleProject.providedDeps.each { dep -> | ||
generatedPom.dependencies.findAll { it.artifactId == dep.name }*.scope = 'provided' | ||
} | ||
pom.whenConfigured { generatedPom -> | ||
// respect 'optional' and 'provided' dependencies | ||
gradleProject.optionalDeps.each { dep -> | ||
generatedPom.dependencies.findAll { it.artifactId == dep.name }*.optional = true | ||
} | ||
gradleProject.providedDeps.each { dep -> | ||
generatedPom.dependencies.findAll { it.artifactId == dep.name }*.scope = 'provided' | ||
} | ||
|
||
// eliminate test-scoped dependencies (no need in maven central poms) | ||
generatedPom.dependencies.removeAll { dep -> | ||
dep.scope == 'test' | ||
} | ||
// eliminate test-scoped dependencies (no need in maven central poms) | ||
generatedPom.dependencies.removeAll { dep -> | ||
dep.scope == 'test' | ||
} | ||
|
||
// add all items necessary for maven central publication | ||
generatedPom.project { | ||
name = gradleProject.description | ||
description = gradleProject.description | ||
url = 'https://github.com/SpringSource/spring-framework' | ||
organization { | ||
name = 'SpringSource' | ||
url = 'http://springsource.org/spring-framework' | ||
} | ||
licenses { | ||
license { | ||
name 'The Apache Software License, Version 2.0' | ||
url 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
distribution 'repo' | ||
} | ||
} | ||
scm { | ||
url = 'https://github.com/SpringSource/spring-framework' | ||
connection = 'scm:git:git://github.com/SpringSource/spring-framework' | ||
developerConnection = 'scm:git:git://github.com/SpringSource/spring-framework' | ||
} | ||
developers { | ||
developer { | ||
id = 'jhoeller' | ||
name = 'Juergen Hoeller' | ||
email = '[email protected]' | ||
} | ||
} | ||
} | ||
} | ||
// add all items necessary for maven central publication | ||
generatedPom.project { | ||
name = gradleProject.description | ||
description = gradleProject.description | ||
url = 'https://github.com/SpringSource/spring-framework' | ||
organization { | ||
name = 'SpringSource' | ||
url = 'http://springsource.org/spring-framework' | ||
} | ||
licenses { | ||
license { | ||
name 'The Apache Software License, Version 2.0' | ||
url 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
distribution 'repo' | ||
} | ||
} | ||
scm { | ||
url = 'https://github.com/SpringSource/spring-framework' | ||
connection = 'scm:git:git://github.com/SpringSource/spring-framework' | ||
developerConnection = 'scm:git:git://github.com/SpringSource/spring-framework' | ||
} | ||
developers { | ||
developer { | ||
id = 'jhoeller' | ||
name = 'Juergen Hoeller' | ||
email = '[email protected]' | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.