Infrastructure: move compiler plugin tests back to their modules
This commit is contained in:
@@ -9,17 +9,27 @@ dependencies {
|
||||
compileOnly(project(":compiler:frontend"))
|
||||
runtime(projectRuntimeJar(":kotlin-compiler"))
|
||||
runtime(projectDist(":kotlin-stdlib"))
|
||||
|
||||
testCompile(project(":compiler:backend"))
|
||||
testCompile(project(":compiler:cli"))
|
||||
testCompile(project(":compiler:tests-common"))
|
||||
testCompile(projectTests(":compiler:tests-common"))
|
||||
testCompile(commonDep("junit:junit"))
|
||||
|
||||
testRuntime(ideaSdkDeps("*.jar"))
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
val jar = runtimeJar {
|
||||
from(fileTree("$projectDir/src")) { include("META-INF/**") }
|
||||
}
|
||||
|
||||
testsJar {}
|
||||
|
||||
dist(targetName = the<BasePluginConvention>().archivesBaseName.removePrefix("kotlin-") + ".jar")
|
||||
|
||||
ideaPlugin {
|
||||
@@ -27,3 +37,6 @@ ideaPlugin {
|
||||
rename("^kotlin-", "")
|
||||
}
|
||||
|
||||
projectTest {
|
||||
workingDir = rootDir
|
||||
}
|
||||
@@ -11,11 +11,21 @@ dependencies {
|
||||
compile(project(":compiler:frontend.java"))
|
||||
compile(project(":compiler:backend"))
|
||||
compileOnly(project(":kotlin-android-extensions-runtime"))
|
||||
|
||||
testCompile(project(":compiler:util"))
|
||||
testCompile(project(":compiler:backend"))
|
||||
testCompile(project(":compiler:cli"))
|
||||
testCompile(project(":compiler:tests-common"))
|
||||
testCompile(projectTests(":compiler:tests-common"))
|
||||
testCompile(projectDist(":kotlin-test:kotlin-test-jvm"))
|
||||
testCompile(commonDep("junit:junit"))
|
||||
testRuntime(ideaPluginDeps("idea-junit", "resources_en", plugin = "junit"))
|
||||
testCompile(project(":kotlin-android-extensions-runtime"))
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
runtimeJar {
|
||||
@@ -25,3 +35,13 @@ runtimeJar {
|
||||
dist()
|
||||
|
||||
ideaPlugin()
|
||||
|
||||
testsJar {}
|
||||
|
||||
evaluationDependsOn(":kotlin-android-extensions-runtime")
|
||||
|
||||
projectTest {
|
||||
environment("ANDROID_EXTENSIONS_RUNTIME_CLASSES", getSourceSetsFrom(":kotlin-android-extensions-runtime")["main"].output.classesDirs.asPath)
|
||||
dependsOnTaskIfExistsRec("dist", project = rootProject)
|
||||
workingDir = rootDir
|
||||
}
|
||||
@@ -6,10 +6,27 @@ dependencies {
|
||||
compile(project(":jps-plugin"))
|
||||
compile(project(":plugins:android-extensions-compiler"))
|
||||
compile(ideaPluginDeps("android-jps-plugin", plugin = "android", subdir = "lib/jps"))
|
||||
|
||||
testCompile(projectTests(":jps-plugin"))
|
||||
testCompile(project(":compiler:tests-common"))
|
||||
testCompileOnly(ideaSdkDeps("jps-build-test", subdir = "jps/test"))
|
||||
testRuntime(ideaPluginDeps("*.jar", plugin = "android"))
|
||||
testCompile(commonDep("junit:junit"))
|
||||
testCompile(projectDist(":kotlin-test:kotlin-test-jvm"))
|
||||
testCompile(projectTests(":kotlin-build-common"))
|
||||
testRuntime(ideaSdkCoreDeps("*.jar"))
|
||||
testRuntime(ideaSdkDeps("*.jar"))
|
||||
testRuntime(ideaSdkDeps("*.jar", subdir = "jps/test"))
|
||||
testRuntime(ideaSdkDeps("*.jar", subdir = "jps"))
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
projectTest {
|
||||
workingDir = rootDir
|
||||
}
|
||||
|
||||
testsJar {}
|
||||
@@ -70,9 +70,8 @@ class KotlinAndroidJpsPlugin : KotlinJpsCompilerArgumentsProvider {
|
||||
val libDirectory = File(PathUtil.getJarPathForClass(this::class.java)).parentFile.parentFile
|
||||
File(libDirectory, JAR_FILE_NAME).absolutePath
|
||||
} else {
|
||||
// We're in tests now (in out/production/android-extensions/android-extensions-jps)
|
||||
val kotlinProjectDirectory = File(PathUtil.getJarPathForClass(this::class.java)).parentFile.parentFile.parentFile
|
||||
File(kotlinProjectDirectory, "dist/kotlinc/lib/$JAR_FILE_NAME").absolutePath
|
||||
// We're in tests now (project root dir)
|
||||
File("dist/kotlinc/lib/$JAR_FILE_NAME").absolutePath
|
||||
})
|
||||
}
|
||||
else emptyList()
|
||||
|
||||
@@ -10,6 +10,8 @@ dependencies {
|
||||
compile(project(":compiler:frontend"))
|
||||
compile(project(":compiler:frontend.java"))
|
||||
compile(project(":compiler:plugin-api"))
|
||||
|
||||
testCompile(project(":compiler:tests-common"))
|
||||
testCompile(projectTests(":compiler:tests-common"))
|
||||
testCompile(ideaSdkDeps("idea", "idea_rt", "openapi"))
|
||||
testCompile(commonDep("junit:junit"))
|
||||
|
||||
@@ -11,17 +11,25 @@ dependencies {
|
||||
compileOnly(project(":compiler:plugin-api"))
|
||||
runtime(projectRuntimeJar(":kotlin-compiler"))
|
||||
runtime(projectDist(":kotlin-stdlib"))
|
||||
|
||||
testCompile(project(":compiler:backend"))
|
||||
testCompile(project(":compiler:cli"))
|
||||
testCompile(project(":compiler:tests-common"))
|
||||
testCompile(projectTests(":compiler:tests-common"))
|
||||
testCompile(commonDep("junit:junit"))
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
val jar = runtimeJar {
|
||||
from(fileTree("$projectDir/src")) { include("META-INF/**") }
|
||||
}
|
||||
|
||||
testsJar {}
|
||||
|
||||
dist(targetName = the<BasePluginConvention>().archivesBaseName.removePrefix("kotlin-") + ".jar")
|
||||
|
||||
ideaPlugin {
|
||||
@@ -29,3 +37,6 @@ ideaPlugin {
|
||||
rename("^kotlin-", "")
|
||||
}
|
||||
|
||||
projectTest {
|
||||
workingDir = rootDir
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
testCompile(project(":compiler:util"))
|
||||
testCompile(project(":compiler:backend"))
|
||||
testCompile(project(":compiler:cli"))
|
||||
testCompile(project(":plugins:android-extensions-compiler"))
|
||||
testCompile(project(":plugins:android-extensions-ide"))
|
||||
testCompile(project(":kotlin-android-extensions-runtime"))
|
||||
testCompile(project(":allopen-ide-plugin")) { isTransitive = false }
|
||||
testCompile(project(":kotlin-allopen-compiler-plugin"))
|
||||
testCompile(project(":noarg-ide-plugin")) { isTransitive = false }
|
||||
testCompile(project(":kotlin-noarg-compiler-plugin"))
|
||||
testCompile(project(":plugins:annotation-based-compiler-plugins-ide-support")) { isTransitive = false }
|
||||
testCompile(project(":sam-with-receiver-ide-plugin")) { isTransitive = false }
|
||||
testCompile(project(":kotlin-sam-with-receiver-compiler-plugin"))
|
||||
testCompile(project(":idea:idea-android")) { isTransitive = false }
|
||||
testCompile(project(":plugins:lint")) { isTransitive = false }
|
||||
testCompile(project(":plugins:uast-kotlin"))
|
||||
testCompile(projectDist(":kotlin-test:kotlin-test-jvm"))
|
||||
testCompile(projectTests(":compiler:tests-common"))
|
||||
testCompile(projectTests(":jps-plugin"))
|
||||
testCompile(commonDep("junit:junit"))
|
||||
testCompileOnly(ideaSdkDeps("jps-builders"))
|
||||
testCompile(ideaSdkDeps("jps-build-test", subdir = "jps/test"))
|
||||
testCompile(ideaPluginDeps("*.jar", plugin = "android", subdir = "lib/jps"))
|
||||
testRuntime(projectDist(":kotlin-reflect"))
|
||||
testRuntime(project(":jps-plugin"))
|
||||
testRuntime(projectTests(":compiler:tests-common-jvm6"))
|
||||
testRuntime(ideaSdkDeps("*.jar"))
|
||||
testRuntime(ideaPluginDeps("idea-junit", "resources_en", plugin = "junit"))
|
||||
testRuntime(ideaPluginDeps("*.jar", plugin = "gradle"))
|
||||
testRuntime(ideaPluginDeps("*.jar", plugin = "android"))
|
||||
testRuntime(preloadedDeps("dx", subdir = "android-5.0/lib"))
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
"main" {}
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
testsJar {}
|
||||
|
||||
evaluationDependsOn(":kotlin-android-extensions-runtime")
|
||||
|
||||
projectTest {
|
||||
environment("ANDROID_EXTENSIONS_RUNTIME_CLASSES", getSourceSetsFrom(":kotlin-android-extensions-runtime")["main"].output.classesDirs.asPath)
|
||||
dependsOnTaskIfExistsRec("dist", project = rootProject)
|
||||
workingDir = rootDir
|
||||
}
|
||||
@@ -9,11 +9,19 @@ dependencies {
|
||||
compileOnly(project(":compiler:plugin-api"))
|
||||
runtime(projectRuntimeJar(":kotlin-compiler"))
|
||||
runtime(projectDist(":kotlin-stdlib"))
|
||||
runtime(projectDist(":kotlin-reflect"))
|
||||
|
||||
testCompile(project(":compiler:backend"))
|
||||
testCompile(project(":compiler:cli"))
|
||||
testCompile(project(":compiler:tests-common"))
|
||||
testCompile(projectTests(":compiler:tests-common"))
|
||||
testCompile(commonDep("junit:junit"))
|
||||
testRuntime(ideaSdkDeps("*.jar"))
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
val jar = runtimeJar {
|
||||
@@ -21,6 +29,7 @@ val jar = runtimeJar {
|
||||
}
|
||||
sourcesJar()
|
||||
javadocJar()
|
||||
testsJar {}
|
||||
|
||||
publish()
|
||||
|
||||
@@ -33,3 +42,6 @@ ideaPlugin {
|
||||
rename("^kotlin-", "")
|
||||
}
|
||||
|
||||
projectTest {
|
||||
workingDir = rootDir
|
||||
}
|
||||
Reference in New Issue
Block a user