This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener). # Fixed URLs ## Fixed Success These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended. * http://issues.gradle.org/browse/GRADLE-1116 with 1 occurrences migrated to: https://issues.gradle.org/browse/GRADLE-1116 ([https](https://issues.gradle.org/browse/GRADLE-1116) result 200). * http://www.apache.org/licenses/LICENSE-2.0.txt with 1 occurrences migrated to: https://www.apache.org/licenses/LICENSE-2.0.txt ([https](https://www.apache.org/licenses/LICENSE-2.0.txt) result 200). * http://projects.spring.io/spring-webflow with 1 occurrences migrated to: https://projects.spring.io/spring-webflow ([https](https://projects.spring.io/spring-webflow) result 301). * http://springsource.org/downloads/sts with 1 occurrences migrated to: https://springsource.org/downloads/sts ([https](https://springsource.org/downloads/sts) result 301). * http://repo.spring.io/libs-release with 1 occurrences migrated to: https://repo.spring.io/libs-release ([https](https://repo.spring.io/libs-release) result 302). * http://repo.spring.io/libs-snapshot with 1 occurrences migrated to: https://repo.spring.io/libs-snapshot ([https](https://repo.spring.io/libs-snapshot) result 302). * http://repo.spring.io/plugins-release with 1 occurrences migrated to: https://repo.spring.io/plugins-release ([https](https://repo.spring.io/plugins-release) result 302).
115 lines
3.9 KiB
Groovy
115 lines
3.9 KiB
Groovy
import org.gradle.plugins.ide.eclipse.model.ProjectDependency
|
|
import org.gradle.plugins.ide.eclipse.model.SourceFolder
|
|
|
|
|
|
apply plugin: "propdeps-eclipse"
|
|
apply plugin: "propdeps-idea"
|
|
|
|
eclipse.jdt {
|
|
sourceCompatibility = 1.7
|
|
targetCompatibility = 1.7
|
|
}
|
|
|
|
// Replace classpath entries with project dependencies (GRADLE-1116)
|
|
// https://issues.gradle.org/browse/GRADLE-1116
|
|
eclipse.classpath.file.whenMerged { classpath ->
|
|
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/) }
|
|
}
|
|
|
|
|
|
// Use separate main/test outputs (prevents WTP from packaging test classes)
|
|
eclipse.classpath.defaultOutputDir = file(project.name+"/bin/eclipse")
|
|
eclipse.classpath.file.beforeMerged { classpath ->
|
|
classpath.entries.findAll{ it instanceof SourceFolder }.each {
|
|
if(it.output.startsWith("bin/")) {
|
|
it.output = null
|
|
}
|
|
}
|
|
}
|
|
eclipse.classpath.file.whenMerged { classpath ->
|
|
classpath.entries.findAll{ it instanceof SourceFolder }.each {
|
|
it.output = "bin/" + it.path.split("/")[1]
|
|
}
|
|
}
|
|
|
|
// Ensure project dependencies come after 3rd-party libs (SPR-11836)
|
|
// https://jira.spring.io/browse/SPR-11836
|
|
eclipse.classpath.file.whenMerged { classpath ->
|
|
classpath.entries.findAll { it instanceof ProjectDependency }.each {
|
|
// delete from original position
|
|
classpath.entries.remove(it)
|
|
// append to end of classpath
|
|
classpath.entries.add(it)
|
|
}
|
|
}
|
|
|
|
// Allow projects to be used as WTP modules
|
|
eclipse.project.natures "org.eclipse.wst.common.project.facet.core.nature"
|
|
|
|
// Include project specific settings
|
|
task eclipseSettings(type: Copy) {
|
|
from rootProject.files(
|
|
"src/eclipse/org.eclipse.jdt.ui.prefs",
|
|
"src/eclipse/org.eclipse.wst.common.project.facet.core.xml")
|
|
into project.file('.settings/')
|
|
outputs.upToDateWhen { false }
|
|
}
|
|
|
|
task eclipseWstComponent(type: Copy) {
|
|
from rootProject.files(
|
|
"src/eclipse/org.eclipse.wst.common.component")
|
|
into project.file('.settings/')
|
|
expand(deployname: project.name)
|
|
outputs.upToDateWhen { false }
|
|
}
|
|
|
|
task eclipseJdtPrepare(type: Copy) {
|
|
from rootProject.file("src/eclipse/org.eclipse.jdt.core.prefs")
|
|
into project.file(".settings/")
|
|
outputs.upToDateWhen { false }
|
|
}
|
|
|
|
task cleanEclipseJdtUi(type: Delete) {
|
|
delete project.file(".settings/org.eclipse.jdt.core.prefs")
|
|
delete project.file(".settings/org.eclipse.jdt.ui.prefs")
|
|
delete project.file(".settings/org.eclipse.wst.common.component")
|
|
delete project.file(".settings/org.eclipse.wst.common.project.facet.core.xml")
|
|
}
|
|
|
|
tasks["eclipseJdt"].dependsOn(eclipseJdtPrepare)
|
|
tasks["cleanEclipse"].dependsOn(cleanEclipseJdtUi)
|
|
tasks["eclipse"].dependsOn(eclipseSettings, eclipseWstComponent)
|
|
|
|
|
|
// Filter 'build' folder
|
|
eclipse.project.file.withXml {
|
|
def node = it.asNode()
|
|
|
|
def filteredResources = node.get("filteredResources")
|
|
if(filteredResources) {
|
|
node.remove(filteredResources)
|
|
}
|
|
def filterNode = node.appendNode("filteredResources").appendNode("filter")
|
|
filterNode.appendNode("id", "1359048889071")
|
|
filterNode.appendNode("name", "")
|
|
filterNode.appendNode("type", "30")
|
|
def matcherNode = filterNode.appendNode("matcher")
|
|
matcherNode.appendNode("id", "org.eclipse.ui.ide.multiFilter")
|
|
matcherNode.appendNode("arguments", "1.0-projectRelativePath-matches-false-false-build")
|
|
}
|