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"
|
||||
source="${java.target}" target="${java.target}">
|
||||
<withKotlin externalannotations="${external.annotations.path}"/>
|
||||
<withKotlin externalannotations="${external.annotations.path}" modulename="kotlin-compiler"/>
|
||||
<skip pattern="kotlin/jvm/internal/.*"/>
|
||||
<src refid="compilerSources.path"/>
|
||||
<classpath refid="classpath"/>
|
||||
@@ -526,8 +526,8 @@
|
||||
<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 -->
|
||||
<zipfileset src="${kotlin-home}/lib/kotlin-compiler.jar" includes="**"/>
|
||||
<zipfileset src="${bootstrap.runtime}" includes="**" excludes="META-INF/**"/>
|
||||
<zipfileset src="${bootstrap.reflect}" includes="**" excludes="META-INF/**"/>
|
||||
<zipfileset src="${bootstrap.runtime}" includes="**" />
|
||||
<zipfileset src="${bootstrap.reflect}" includes="**" />
|
||||
|
||||
<manifest>
|
||||
<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 org.jetbrains.kotlin.cli.jvm.compiler.CliLightClassGenerationSupport
|
||||
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_JS = listOf("kotlin", "jquery", "html5")
|
||||
@@ -125,8 +126,9 @@ class NoInternalVisibilityInStdLibTest {
|
||||
val environment = KotlinCoreEnvironment.createForProduction(disposable!!, configuration, EnvironmentConfigFiles.JVM_CONFIG_FILES)
|
||||
|
||||
TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegrationWithCustomContext(
|
||||
TopDownAnalyzerFacadeForJVM.createContextWithSealedModule(environment.project),
|
||||
environment.getSourceFiles(), CliLightClassGenerationSupport.NoScopeRecordCliBindingTrace(), null, null
|
||||
TopDownAnalyzerFacadeForJVM.createContextWithSealedModule(environment.project, "test"),
|
||||
environment.getSourceFiles(), CliLightClassGenerationSupport.NoScopeRecordCliBindingTrace(), null, null,
|
||||
JvmPackagePartProvider(environment)
|
||||
).moduleDescriptor
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
[INFO] Compiling Kotlin sources from [/src/main/kotlin]
|
||||
[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] ModuleName is test-project
|
||||
[INFO] PERF: INIT: Compiler initialized in LLL ms
|
||||
[INFO] PERF: ANALYZE: 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)
|
||||
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
|
||||
@Override
|
||||
protected K2JVMCompiler createCompiler() {
|
||||
@@ -112,6 +118,9 @@ public class K2JVMCompileMojo extends KotlinCompileMojoBase<K2JVMCompilerArgumen
|
||||
arguments.annotations = getFullAnnotationsPath(getLog(), annotationPaths);
|
||||
getLog().info("Using kotlin annotations from " + arguments.annotations);
|
||||
|
||||
arguments.moduleName = moduleName;
|
||||
getLog().info("ModuleName is " + moduleName);
|
||||
|
||||
try {
|
||||
Args.parse(arguments, ArrayUtil.toStringArray(args));
|
||||
}
|
||||
|
||||
+1
@@ -87,6 +87,7 @@ public class KotlinTestCompileMojo extends K2JVMCompileMojo {
|
||||
module = testModule;
|
||||
classpath = testClasspath;
|
||||
output = testOutput;
|
||||
moduleName = testModuleName;
|
||||
|
||||
super.configureSpecificCompilerArguments(arguments);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user