-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split the Zipline API validator into its own module (#1060)
After implementation there isn't much code shared with the Kotlin compiler plugin. Lets keep these separate for simplicity, and to avoid dragging compiler plugin dependencies into the CLI.
- Loading branch information
1 parent
0fa3347
commit 7d087ba
Showing
21 changed files
with
121 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
rootProject.name = "zipline-root" | ||
|
||
include(":zipline") | ||
include(":zipline-testing") | ||
include(":zipline-api-validator") | ||
include(":zipline-bytecode") | ||
include(":zipline-cli") | ||
include(":zipline-gradle-plugin") | ||
include(":zipline-kotlin-plugin") | ||
include(":zipline-kotlin-plugin-tests") | ||
include(":zipline-bytecode") | ||
include(":zipline-loader") | ||
include(":zipline-loader-testing") | ||
include(":zipline-profiler") | ||
include(":zipline-testing") | ||
|
||
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import com.vanniktech.maven.publish.JavadocJar | ||
import com.vanniktech.maven.publish.KotlinJvm | ||
import com.vanniktech.maven.publish.MavenPublishBaseExtension | ||
import org.gradle.api.plugins.JavaPlugin.TEST_TASK_NAME | ||
import org.jetbrains.kotlin.gradle.plugin.KotlinCompilation.Companion.TEST_COMPILATION_NAME | ||
|
||
plugins { | ||
kotlin("jvm") | ||
kotlin("kapt") | ||
id("com.vanniktech.maven.publish.base") | ||
} | ||
|
||
dependencies { | ||
api(kotlin("compiler-embeddable")) | ||
api(libs.okio.core) | ||
|
||
kapt(libs.auto.service.compiler) | ||
compileOnly(libs.auto.service.annotations) | ||
|
||
testImplementation(projects.zipline) | ||
testImplementation(libs.assertk) | ||
testImplementation(libs.junit) | ||
testImplementation(libs.kotlin.test) | ||
} | ||
|
||
// In order to simplify writing test schemas, inject the test sources and | ||
// test classpath as properties into the test runtime. This allows testing | ||
// the FIR-based parser on sources written inside the test case. Cool! | ||
tasks.named<Test>(TEST_TASK_NAME).configure { | ||
val compilation = kotlin.target.compilations.getByName(TEST_COMPILATION_NAME) | ||
|
||
val sources = compilation.defaultSourceSet.kotlin.sourceDirectories.files | ||
systemProperty("zipline.internal.sources", sources.joinToString(separator = File.pathSeparator)) | ||
|
||
val classpath = project.configurations.getByName(compilation.compileDependencyConfigurationName).files | ||
systemProperty("zipline.internal.classpath", classpath.joinToString(separator = File.pathSeparator)) | ||
} | ||
|
||
configure<MavenPublishBaseExtension> { | ||
configure( | ||
KotlinJvm( | ||
javadocJar = JavadocJar.Empty() | ||
) | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.