[K/N][build] Make build-tools to be able to build as a project

* Replace and fix project dependencies in build-tools
* Add Gradle annotations for tasks
This commit is contained in:
Pavel Punegov
2023-01-26 19:35:50 +01:00
committed by Space Team
parent dcc5c7e435
commit 45637c1b94
3 changed files with 13 additions and 14 deletions
+5 -13
View File
@@ -43,9 +43,6 @@ dependencies {
api(gradleApi()) api(gradleApi())
api(kotlinStdlib()) api(kotlinStdlib())
commonApi(project(":kotlin-gradle-plugin"))
commonApi(project(":kotlin-gradle-plugin-api"))
commonApi(project(":kotlin-gradle-plugin-model"))
implementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false } implementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
implementation("org.jetbrains.kotlin:kotlin-build-gradle-plugin:${kotlinBuildProperties.buildGradlePluginVersion}") implementation("org.jetbrains.kotlin:kotlin-build-gradle-plugin:${kotlinBuildProperties.buildGradlePluginVersion}")
@@ -63,17 +60,12 @@ dependencies {
} }
} }
api(project(":native:kotlin-native-utils")) implementation(commonDependency("org.jetbrains.kotlinx:kotlinx-coroutines-core"))
api(project(":kotlin-native-shared"))
api(project(":kotlinx-metadata-klib"))
}
kotlin { implementation(commonDependency("org.jetbrains.kotlin:kotlin-native-utils:$kotlinVersion"))
sourceSets { implementation(commonDependency("org.jetbrains.kotlinx:kotlinx-metadata-klib:$metadataVersion"))
main {
kotlin.srcDir("$projectDir/../tools/benchmarks/shared/src/main/kotlin/report") api(project(":kotlin-native-shared"))
}
}
} }
val compileKotlin: KotlinCompile by tasks val compileKotlin: KotlinCompile by tasks
@@ -2,6 +2,8 @@ package org.jetbrains.kotlin
import org.gradle.api.Action import org.gradle.api.Action
import org.gradle.api.Task import org.gradle.api.Task
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.Internal
/** /**
* An interface that any test that works with ExecutorService * An interface that any test that works with ExecutorService
@@ -11,12 +13,14 @@ interface KonanTestExecutable : Task {
/** /**
* Test executable to be run by the service. * Test executable to be run by the service.
*/ */
@get:Input
val executable: String val executable: String
/** /**
* Action that configures task or does some workload before the test will be executed. * Action that configures task or does some workload before the test will be executed.
* Could be done as a first step in the test or just as a `doFirst` action in the test task. * Could be done as a first step in the test or just as a `doFirst` action in the test task.
*/ */
@get:Input
var doBeforeRun: Action<in Task>? var doBeforeRun: Action<in Task>?
/** /**
@@ -24,10 +28,12 @@ interface KonanTestExecutable : Task {
* Depending on the test task implementation this action is done before the build task * Depending on the test task implementation this action is done before the build task
* or as its `doFirst` action. * or as its `doFirst` action.
*/ */
@get:Input
var doBeforeBuild: Action<in Task>? var doBeforeBuild: Action<in Task>?
/** /**
* Build tasks that this [executable] depends on, or is built from. * Build tasks that this [executable] depends on, or is built from.
*/ */
@get:Internal
val buildTasks: List<Task> val buildTasks: List<Task>
} }
@@ -54,12 +54,13 @@ abstract class KonanTest : DefaultTask(), KonanTestExecutable {
/** /**
* Test executable arguments. * Test executable arguments.
*/ */
@Input @get:Input
var arguments = mutableListOf<String>() var arguments = mutableListOf<String>()
/** /**
* Test executable. * Test executable.
*/ */
@get:Input
abstract override val executable: String abstract override val executable: String
/** /**