mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 17:20:55 +07:00
jps-bootstrap: Add JPS_BOOTSTRAP_CLASSPATH_FILE_TARGET env variable to specify the target file w/ module class path written to
GitOrigin-RevId: 27dd75a58397e5c49a1cbfb1ad151458ce65b422
This commit is contained in:
committed by
intellij-monorepo-bot
parent
6e63bbb517
commit
82cfb8ed0a
@@ -164,6 +164,11 @@ class JpsBootstrapMain(args: Array<String>?) {
|
||||
} else {
|
||||
writeJavaArgfile(moduleRuntimeClasspath, null)
|
||||
}
|
||||
|
||||
val classpathFileTargetString = System.getenv(CLASSPATH_FILE_TARGET_ENV)
|
||||
if (!classpathFileTargetString.isNullOrBlank()) {
|
||||
writeClasspathFile(moduleRuntimeClasspath, Path.of(classpathFileTargetString))
|
||||
}
|
||||
}
|
||||
|
||||
private fun removeOpenedPackage(openedPackages: MutableList<String>, openedPackage: String, unknownPackages: MutableList<String>) {
|
||||
@@ -261,6 +266,16 @@ class JpsBootstrapMain(args: Array<String>?) {
|
||||
info("java argfile:\n${Files.readString(javaArgsFileTarget)}")
|
||||
}
|
||||
|
||||
@Throws(Exception::class)
|
||||
private fun writeClasspathFile(moduleRuntimeClasspath: List<File>, classpathFileTarget: Path) {
|
||||
CommandLineWrapperUtil.writeArgumentsFile(
|
||||
classpathFileTarget.toFile(),
|
||||
moduleRuntimeClasspath.map { it.path },
|
||||
StandardCharsets.UTF_8
|
||||
)
|
||||
info("classpath file:\n${Files.readString(classpathFileTarget)}")
|
||||
}
|
||||
|
||||
@Throws(Throwable::class)
|
||||
private fun downloadOrBuildClasses(module: JpsModule, model: JpsModel, kotlincHome: Path) {
|
||||
val fromJpsBuildEnvValue = System.getenv(JpsBuild.CLASSES_FROM_JPS_BUILD_ENV_NAME)
|
||||
@@ -308,6 +323,7 @@ class JpsBootstrapMain(args: Array<String>?) {
|
||||
|
||||
companion object {
|
||||
private const val DEFAULT_BUILD_SCRIPT_XMX = "4g"
|
||||
private const val CLASSPATH_FILE_TARGET_ENV = "JPS_BOOTSTRAP_CLASSPATH_FILE_TARGET"
|
||||
private const val COMMUNITY_HOME_ENV = "JPS_BOOTSTRAP_COMMUNITY_HOME"
|
||||
private const val JPS_BOOTSTRAP_VERBOSE = "JPS_BOOTSTRAP_VERBOSE"
|
||||
private val OPT_HELP = Option.builder("h").longOpt("help").build()
|
||||
|
||||
Reference in New Issue
Block a user