mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Cleanup (IDEA-CR-30753)
This commit is contained in:
@@ -113,18 +113,12 @@ task setupJdk16(dependsOn: configurations.jdk16) {
|
||||
logger.info("Setting up JDK 1.6 to compile")
|
||||
unpackJdk(jdkArchive.call(), outputDir)
|
||||
deleteBrokenSymlink(outputDir)
|
||||
if (!new File(outputDir, "bin").exists() && new File(outputDir, "jre/bin").exists()) {
|
||||
copy {
|
||||
from file(new File(outputDir, "jre/bin"))
|
||||
into file(new File(outputDir, "bin"))
|
||||
include 'java*'
|
||||
}
|
||||
}
|
||||
createMissingLauncher(outputDir)
|
||||
}
|
||||
}
|
||||
|
||||
// Gradle dies on trying to process broken links: https://issues.gradle.org/browse/GRADLE-1843
|
||||
private void deleteBrokenSymlink(def outputDir) {
|
||||
private void deleteBrokenSymlink(String outputDir) {
|
||||
if (org.gradle.internal.os.OperatingSystem.current().isMacOsX()) {
|
||||
def pluginJar = file("$outputDir/Contents/Home/lib/plugin.jar")
|
||||
if (!pluginJar.exists()) {
|
||||
@@ -135,6 +129,17 @@ private void deleteBrokenSymlink(def outputDir) {
|
||||
}
|
||||
}
|
||||
|
||||
// some JPS builders rely on a launcher presence in <JDK>/bin directory
|
||||
private void createMissingLauncher(String outputDir) {
|
||||
if (!new File(outputDir, "bin").exists() && new File(outputDir, "jre/bin").exists()) {
|
||||
copy {
|
||||
from file(new File(outputDir, "jre/bin"))
|
||||
into file(new File(outputDir, "bin"))
|
||||
include 'java*'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setupJdk16.onlyIf { inJetBrainsNetwork }
|
||||
|
||||
def intellijProjectDir() {
|
||||
|
||||
Reference in New Issue
Block a user