mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
build scripts: dbe_test_jars scripts reuses new code to compile the project
This commit is contained in:
@@ -35,4 +35,6 @@ interface CompilationContext {
|
||||
JpsModule findRequiredModule(String name)
|
||||
|
||||
JpsModule findModule(String name)
|
||||
|
||||
void notifyArtifactBuilt(String artifactPath)
|
||||
}
|
||||
|
||||
+5
-17
@@ -16,7 +16,6 @@
|
||||
package org.jetbrains.intellij.build.impl
|
||||
|
||||
import com.intellij.openapi.util.Pair
|
||||
import com.intellij.openapi.util.io.FileUtil
|
||||
import com.intellij.openapi.util.text.StringUtil
|
||||
import groovy.transform.CompileDynamic
|
||||
import groovy.transform.CompileStatic
|
||||
@@ -29,7 +28,6 @@ import org.jetbrains.jps.model.java.JavaSourceRootProperties
|
||||
import org.jetbrains.jps.model.module.JpsModule
|
||||
|
||||
import java.util.function.BiFunction
|
||||
|
||||
/**
|
||||
* @author nik
|
||||
*/
|
||||
@@ -146,6 +144,11 @@ class BuildContextImpl extends BuildContext {
|
||||
return compilationContext.findModule(name)
|
||||
}
|
||||
|
||||
@Override
|
||||
void notifyArtifactBuilt(String artifactPath) {
|
||||
compilationContext.notifyArtifactBuilt(artifactPath)
|
||||
}
|
||||
|
||||
@Override
|
||||
File findFileInModuleSources(String moduleName, String relativePath) {
|
||||
getSourceRootsWithPrefixes(findRequiredModule(moduleName)).collect {
|
||||
@@ -264,19 +267,4 @@ class BuildContextImpl extends BuildContext {
|
||||
}
|
||||
return jvmArgs.trim()
|
||||
}
|
||||
|
||||
@Override
|
||||
void notifyArtifactBuilt(String artifactPath) {
|
||||
def file = new File(artifactPath)
|
||||
def baseDir = new File(paths.projectHome)
|
||||
if (!FileUtil.isAncestor(baseDir, file, true)) {
|
||||
messages.warning("Artifact '$artifactPath' is not under '$paths.projectHome', it won't be reported")
|
||||
return
|
||||
}
|
||||
def relativePath = FileUtil.toSystemIndependentName(FileUtil.getRelativePath(baseDir, file))
|
||||
if (file.isDirectory()) {
|
||||
relativePath += "=>" + file.name
|
||||
}
|
||||
messages.artifactBuild(relativePath)
|
||||
}
|
||||
}
|
||||
|
||||
+15
@@ -216,6 +216,21 @@ class CompilationContextImpl implements CompilationContext {
|
||||
project.modules.find { it.name == name }
|
||||
}
|
||||
|
||||
@Override
|
||||
void notifyArtifactBuilt(String artifactPath) {
|
||||
def file = new File(artifactPath)
|
||||
def baseDir = new File(paths.projectHome)
|
||||
if (!FileUtil.isAncestor(baseDir, file, true)) {
|
||||
messages.warning("Artifact '$artifactPath' is not under '$paths.projectHome', it won't be reported")
|
||||
return
|
||||
}
|
||||
def relativePath = FileUtil.toSystemIndependentName(FileUtil.getRelativePath(baseDir, file))
|
||||
if (file.isDirectory()) {
|
||||
relativePath += "=>" + file.name
|
||||
}
|
||||
messages.artifactBuild(relativePath)
|
||||
}
|
||||
|
||||
private static String toCanonicalPath(String communityHome) {
|
||||
FileUtil.toSystemIndependentName(new File(communityHome).canonicalPath)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user