[repo] Migrate Groovy build scripts to use 'sourcesJar()' directly from buildSrc
This commit is contained in:
committed by
Space Team
parent
6d5f1c84a7
commit
d7fc4a1d27
@@ -159,6 +159,7 @@ private fun Project.mainKotlinSourceSet() =
|
||||
(extensions.findByName("kotlin") as? KotlinSourceSetContainer)?.sourceSets?.findByName("main")
|
||||
private fun Project.sources() = mainJavaPluginSourceSet()?.allSource ?: mainKotlinSourceSet()?.kotlin
|
||||
|
||||
@JvmOverloads
|
||||
fun Project.sourcesJar(body: Jar.() -> Unit = {}): TaskProvider<Jar> {
|
||||
configure<JavaPluginExtension> {
|
||||
withSourcesJar()
|
||||
|
||||
@@ -71,12 +71,3 @@ ext.configureFrontendIr = { Project project ->
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
allprojects { project ->
|
||||
project.ext.configureSourcesJar = { lambda = {} ->
|
||||
RepoArtifacts.sourcesJar(project) { task ->
|
||||
lambda.delegate = task
|
||||
lambda()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,5 +17,5 @@ jar {
|
||||
manifestAttributes(manifest, project, 'Test')
|
||||
}
|
||||
|
||||
configureSourcesJar()
|
||||
RepoArtifacts.sourcesJar(project)
|
||||
RepoArtifacts.javadocJar(project)
|
||||
|
||||
@@ -13,7 +13,7 @@ jar {
|
||||
manifestAttributes(manifest, project, 'Test')
|
||||
}
|
||||
|
||||
configureSourcesJar()
|
||||
RepoArtifacts.sourcesJar(project)
|
||||
RepoArtifacts.javadocJar(project)
|
||||
|
||||
tasks.withType(org.jetbrains.kotlin.gradle.dsl.KotlinCompile) {
|
||||
|
||||
@@ -86,6 +86,5 @@ artifacts {
|
||||
}
|
||||
}
|
||||
|
||||
configureSourcesJar()
|
||||
|
||||
RepoArtifacts.sourcesJar(project)
|
||||
RepoArtifacts.javadocJar(project)
|
||||
|
||||
@@ -26,7 +26,7 @@ jar {
|
||||
}
|
||||
}
|
||||
|
||||
configureSourcesJar()
|
||||
RepoArtifacts.sourcesJar(project)
|
||||
RepoArtifacts.javadocJar(project)
|
||||
|
||||
compileKotlin {
|
||||
|
||||
@@ -27,7 +27,7 @@ jar {
|
||||
}
|
||||
}
|
||||
|
||||
configureSourcesJar()
|
||||
RepoArtifacts.sourcesJar(project)
|
||||
RepoArtifacts.javadocJar(project)
|
||||
|
||||
compileKotlin {
|
||||
|
||||
@@ -28,8 +28,7 @@ jar {
|
||||
}
|
||||
}
|
||||
|
||||
configureSourcesJar()
|
||||
|
||||
RepoArtifacts.sourcesJar(project)
|
||||
RepoArtifacts.javadocJar(project)
|
||||
|
||||
compileKotlin {
|
||||
|
||||
@@ -28,7 +28,7 @@ jar {
|
||||
}
|
||||
}
|
||||
|
||||
configureSourcesJar()
|
||||
RepoArtifacts.sourcesJar(project)
|
||||
RepoArtifacts.javadocJar(project)
|
||||
|
||||
compileKotlin {
|
||||
|
||||
@@ -66,7 +66,7 @@ jar {
|
||||
manifestAttributes(manifest, project, 'Main')
|
||||
}
|
||||
|
||||
configureSourcesJar()
|
||||
RepoArtifacts.sourcesJar(project)
|
||||
RepoArtifacts.javadocJar(project)
|
||||
|
||||
sourcesJar.dependsOn(":prepare:build.version:writeStdlibVersion")
|
||||
|
||||
@@ -5,7 +5,7 @@ apply plugin: 'kotlin'
|
||||
JvmToolchain.configureJvmToolchain(project, JdkMajorVersion.JDK_1_8)
|
||||
|
||||
configurePublishing(project)
|
||||
configureSourcesJar()
|
||||
RepoArtifacts.sourcesJar(project)
|
||||
RepoArtifacts.javadocJar(project)
|
||||
|
||||
sourceSets {
|
||||
|
||||
@@ -3,7 +3,7 @@ description = 'Kotlin Standard Library JDK 8 extension'
|
||||
apply plugin: 'kotlin'
|
||||
|
||||
configurePublishing(project)
|
||||
configureSourcesJar()
|
||||
RepoArtifacts.sourcesJar(project)
|
||||
RepoArtifacts.javadocJar(project)
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -10,7 +10,7 @@ JvmToolchain.configureJvmToolchain(project, JdkMajorVersion.JDK_1_8)
|
||||
|
||||
configurePublishing(project)
|
||||
RepoArtifacts.javadocJar(project)
|
||||
configureSourcesJar()
|
||||
RepoArtifacts.sourcesJar(project)
|
||||
|
||||
configurations {
|
||||
distSources
|
||||
|
||||
@@ -18,7 +18,7 @@ dependencies {
|
||||
compileOnly RepoDependencies.kotlinBuiltins(project)
|
||||
}
|
||||
|
||||
configureSourcesJar()
|
||||
RepoArtifacts.sourcesJar(project)
|
||||
RepoArtifacts.javadocJar(project)
|
||||
|
||||
compileKotlin {
|
||||
|
||||
@@ -7,5 +7,5 @@ dependencies {
|
||||
}
|
||||
|
||||
RepoArtifacts.runtimeJar(project, {})
|
||||
configureSourcesJar()
|
||||
RepoArtifacts.sourcesJar(project)
|
||||
RepoArtifacts.javadocJar(project)
|
||||
|
||||
@@ -22,7 +22,7 @@ jar {
|
||||
manifestAttributes(manifest, project, 'Main')
|
||||
}
|
||||
|
||||
configureSourcesJar()
|
||||
RepoArtifacts.sourcesJar(project)
|
||||
RepoArtifacts.javadocJar(project)
|
||||
|
||||
compileKotlin {
|
||||
|
||||
Reference in New Issue
Block a user