Maven plugin fixes
This commit is contained in:
@@ -499,7 +499,7 @@
|
|||||||
|
|
||||||
<javac2 destdir="${output}/classes/compiler" debug="true" debuglevel="lines,vars,source" includeAntRuntime="false"
|
<javac2 destdir="${output}/classes/compiler" debug="true" debuglevel="lines,vars,source" includeAntRuntime="false"
|
||||||
source="${java.target}" target="${java.target}">
|
source="${java.target}" target="${java.target}">
|
||||||
<withKotlin externalannotations="${external.annotations.path}"/>
|
<withKotlin externalannotations="${external.annotations.path}" modulename="kotlin-compiler"/>
|
||||||
<skip pattern="kotlin/jvm/internal/.*"/>
|
<skip pattern="kotlin/jvm/internal/.*"/>
|
||||||
<src refid="compilerSources.path"/>
|
<src refid="compilerSources.path"/>
|
||||||
<classpath refid="classpath"/>
|
<classpath refid="classpath"/>
|
||||||
@@ -526,8 +526,8 @@
|
|||||||
<jar jarfile="${output}/kotlin-compiler-for-maven.jar">
|
<jar jarfile="${output}/kotlin-compiler-for-maven.jar">
|
||||||
<!-- TODO: don't include both to the jar: it's impossible to test changes to core in the local maven build without bootstrap -->
|
<!-- TODO: don't include both to the jar: it's impossible to test changes to core in the local maven build without bootstrap -->
|
||||||
<zipfileset src="${kotlin-home}/lib/kotlin-compiler.jar" includes="**"/>
|
<zipfileset src="${kotlin-home}/lib/kotlin-compiler.jar" includes="**"/>
|
||||||
<zipfileset src="${bootstrap.runtime}" includes="**" excludes="META-INF/**"/>
|
<zipfileset src="${bootstrap.runtime}" includes="**" />
|
||||||
<zipfileset src="${bootstrap.reflect}" includes="**" excludes="META-INF/**"/>
|
<zipfileset src="${bootstrap.reflect}" includes="**" />
|
||||||
|
|
||||||
<manifest>
|
<manifest>
|
||||||
<attribute name="Built-By" value="${manifest.impl.vendor}"/>
|
<attribute name="Built-By" value="${manifest.impl.vendor}"/>
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ import org.jetbrains.kotlin.js.analyze.TopDownAnalyzerFacadeForJS
|
|||||||
import com.intellij.openapi.Disposable
|
import com.intellij.openapi.Disposable
|
||||||
import org.jetbrains.kotlin.cli.jvm.compiler.CliLightClassGenerationSupport
|
import org.jetbrains.kotlin.cli.jvm.compiler.CliLightClassGenerationSupport
|
||||||
import org.jetbrains.kotlin.context.ModuleContext
|
import org.jetbrains.kotlin.context.ModuleContext
|
||||||
|
import org.jetbrains.kotlin.cli.jvm.compiler.JvmPackagePartProvider
|
||||||
|
|
||||||
private val ANALYZE_PACKAGE_ROOTS_FOR_JVM = listOf("kotlin")
|
private val ANALYZE_PACKAGE_ROOTS_FOR_JVM = listOf("kotlin")
|
||||||
private val ANALYZE_PACKAGE_ROOTS_FOR_JS = listOf("kotlin", "jquery", "html5")
|
private val ANALYZE_PACKAGE_ROOTS_FOR_JS = listOf("kotlin", "jquery", "html5")
|
||||||
@@ -125,8 +126,9 @@ class NoInternalVisibilityInStdLibTest {
|
|||||||
val environment = KotlinCoreEnvironment.createForProduction(disposable!!, configuration, EnvironmentConfigFiles.JVM_CONFIG_FILES)
|
val environment = KotlinCoreEnvironment.createForProduction(disposable!!, configuration, EnvironmentConfigFiles.JVM_CONFIG_FILES)
|
||||||
|
|
||||||
TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegrationWithCustomContext(
|
TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegrationWithCustomContext(
|
||||||
TopDownAnalyzerFacadeForJVM.createContextWithSealedModule(environment.project),
|
TopDownAnalyzerFacadeForJVM.createContextWithSealedModule(environment.project, "test"),
|
||||||
environment.getSourceFiles(), CliLightClassGenerationSupport.NoScopeRecordCliBindingTrace(), null, null
|
environment.getSourceFiles(), CliLightClassGenerationSupport.NoScopeRecordCliBindingTrace(), null, null,
|
||||||
|
JvmPackagePartProvider(environment)
|
||||||
).moduleDescriptor
|
).moduleDescriptor
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
[INFO] Compiling Kotlin sources from [/src/main/kotlin]
|
[INFO] Compiling Kotlin sources from [/src/main/kotlin]
|
||||||
[INFO] Classes directory is /target/classes
|
[INFO] Classes directory is /target/classes
|
||||||
[INFO] Using kotlin annotations from /local-repo/org/jetbrains/kotlin/kotlin-jdk-annotations/0.1-SNAPSHOT/kotlin-jdk-annotations-0.1-SNAPSHOT.jar
|
[INFO] Using kotlin annotations from /local-repo/org/jetbrains/kotlin/kotlin-jdk-annotations/0.1-SNAPSHOT/kotlin-jdk-annotations-0.1-SNAPSHOT.jar
|
||||||
|
[INFO] ModuleName is test-project
|
||||||
[INFO] PERF: INIT: Compiler initialized in LLL ms
|
[INFO] PERF: INIT: Compiler initialized in LLL ms
|
||||||
[INFO] PERF: ANALYZE: 1 files (2 lines) in LLL ms
|
[INFO] PERF: ANALYZE: 1 files (2 lines) in LLL ms
|
||||||
[INFO] PERF: GENERATE: 1 files (2 lines) in LLL ms
|
[INFO] PERF: GENERATE: 1 files (2 lines) in LLL ms
|
||||||
+9
@@ -73,6 +73,12 @@ public class K2JVMCompileMojo extends KotlinCompileMojoBase<K2JVMCompilerArgumen
|
|||||||
@Parameter(defaultValue = "${project.testClasspathElements}", required = true, readonly = true)
|
@Parameter(defaultValue = "${project.testClasspathElements}", required = true, readonly = true)
|
||||||
protected List<String> testClasspath;
|
protected List<String> testClasspath;
|
||||||
|
|
||||||
|
@Parameter(defaultValue = "${project.artifactId}", required = true, readonly = true)
|
||||||
|
protected String moduleName;
|
||||||
|
|
||||||
|
@Parameter(defaultValue = "${project.artifactId}-test", required = true, readonly = true)
|
||||||
|
protected String testModuleName;
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
protected K2JVMCompiler createCompiler() {
|
protected K2JVMCompiler createCompiler() {
|
||||||
@@ -112,6 +118,9 @@ public class K2JVMCompileMojo extends KotlinCompileMojoBase<K2JVMCompilerArgumen
|
|||||||
arguments.annotations = getFullAnnotationsPath(getLog(), annotationPaths);
|
arguments.annotations = getFullAnnotationsPath(getLog(), annotationPaths);
|
||||||
getLog().info("Using kotlin annotations from " + arguments.annotations);
|
getLog().info("Using kotlin annotations from " + arguments.annotations);
|
||||||
|
|
||||||
|
arguments.moduleName = moduleName;
|
||||||
|
getLog().info("ModuleName is " + moduleName);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Args.parse(arguments, ArrayUtil.toStringArray(args));
|
Args.parse(arguments, ArrayUtil.toStringArray(args));
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -87,6 +87,7 @@ public class KotlinTestCompileMojo extends K2JVMCompileMojo {
|
|||||||
module = testModule;
|
module = testModule;
|
||||||
classpath = testClasspath;
|
classpath = testClasspath;
|
||||||
output = testOutput;
|
output = testOutput;
|
||||||
|
moduleName = testModuleName;
|
||||||
|
|
||||||
super.configureSpecificCompilerArguments(arguments);
|
super.configureSpecificCompilerArguments(arguments);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user