mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
+9
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -48,6 +48,7 @@ class BuildContextImpl extends BuildContext {
|
||||
def context = new BuildContextImpl(compilationContext, productProperties,
|
||||
windowsDistributionCustomizer, linuxDistributionCustomizer, macDistributionCustomizer,
|
||||
proprietaryBuildTools)
|
||||
setupDependencies(context.messages, communityHome)
|
||||
return context
|
||||
}
|
||||
|
||||
@@ -75,6 +76,13 @@ class BuildContextImpl extends BuildContext {
|
||||
bootClassPathJarNames = ["bootstrap.jar", "extensions.jar", "util.jar", "jdom.jar", "log4j.jar", "trove4j.jar", "jna.jar"]
|
||||
}
|
||||
|
||||
private static void setupDependencies(BuildMessages messages, String communityHome) {
|
||||
messages.info("Setting up installer dependencies")
|
||||
if (!BuildUtils.gradle(new File(communityHome, 'build/dependencies/'), 'cleanSetupJbre', 'setupDependencies')) {
|
||||
messages.error("Cannot setup installer dependencies")
|
||||
}
|
||||
}
|
||||
|
||||
private String readSnapshotBuildNumber() {
|
||||
new File(paths.communityHome, "build.txt").text.trim()
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package org.jetbrains.intellij.build.impl
|
||||
|
||||
import com.intellij.openapi.util.SystemInfo
|
||||
import com.intellij.openapi.util.io.FileUtil
|
||||
import com.intellij.openapi.util.text.StringUtil
|
||||
import groovy.transform.CompileStatic
|
||||
@@ -82,4 +83,15 @@ class BuildUtils {
|
||||
return System.out
|
||||
}
|
||||
}
|
||||
|
||||
static boolean gradle(File projectDir, String... tasks) {
|
||||
def gradleScript = SystemInfo.isWindows ? "gradlew.bat" : "gradlew"
|
||||
List<String> command = new ArrayList()
|
||||
command.add("${projectDir.absolutePath}/$gradleScript".toString())
|
||||
command.addAll(tasks)
|
||||
def process = new ProcessBuilder(command).directory(projectDir).start()
|
||||
process.consumeProcessOutputStream((OutputStream)System.out)
|
||||
process.consumeProcessErrorStream((OutputStream)System.err)
|
||||
return process.waitFor() == 0
|
||||
}
|
||||
}
|
||||
+3
-11
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
package org.jetbrains.intellij.build.impl
|
||||
|
||||
import com.intellij.openapi.util.SystemInfo
|
||||
import com.intellij.openapi.util.io.FileUtil
|
||||
import groovy.transform.CompileDynamic
|
||||
import groovy.transform.CompileStatic
|
||||
@@ -122,16 +121,9 @@ class CompilationContextImpl implements CompilationContext {
|
||||
}
|
||||
|
||||
private static void setupDependencies(BuildMessages messages, String communityHome) {
|
||||
messages.info("Setting up dependencies")
|
||||
def workingDirectory = new File(communityHome, 'build/dependencies/')
|
||||
def gradleScript = SystemInfo.isWindows ? "gradlew.bat" : "gradlew"
|
||||
def process = new ProcessBuilder("${workingDirectory.absolutePath}/$gradleScript", 'cleanSetupJbre', 'setupDependencies')
|
||||
.directory(workingDirectory)
|
||||
.start()
|
||||
process.consumeProcessOutputStream((OutputStream)System.out)
|
||||
process.consumeProcessErrorStream((OutputStream)System.err)
|
||||
if (process.waitFor() != 0) {
|
||||
messages.error("Cannot setup dependencies")
|
||||
messages.info("Setting up compilation dependencies")
|
||||
if (!BuildUtils.gradle(new File(communityHome, 'build/dependencies/'), 'setupJdks', 'setupKotlin')) {
|
||||
messages.error("Cannot setup compilation dependencies")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user