[repo] Migrate Groovy build scripts to use 'sourcesJar()' directly from buildSrc

This commit is contained in:
Yahor Berdnikau
2023-06-30 18:43:01 +02:00
committed by Space Team
parent 6d5f1c84a7
commit d7fc4a1d27
16 changed files with 15 additions and 25 deletions
@@ -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()
-9
View File
@@ -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)
+1 -1
View File
@@ -13,7 +13,7 @@ jar {
manifestAttributes(manifest, project, 'Test')
}
configureSourcesJar()
RepoArtifacts.sourcesJar(project)
RepoArtifacts.javadocJar(project)
tasks.withType(org.jetbrains.kotlin.gradle.dsl.KotlinCompile) {
+1 -2
View File
@@ -86,6 +86,5 @@ artifacts {
}
}
configureSourcesJar()
RepoArtifacts.sourcesJar(project)
RepoArtifacts.javadocJar(project)
+1 -1
View File
@@ -26,7 +26,7 @@ jar {
}
}
configureSourcesJar()
RepoArtifacts.sourcesJar(project)
RepoArtifacts.javadocJar(project)
compileKotlin {
+1 -1
View File
@@ -27,7 +27,7 @@ jar {
}
}
configureSourcesJar()
RepoArtifacts.sourcesJar(project)
RepoArtifacts.javadocJar(project)
compileKotlin {
+1 -2
View File
@@ -28,8 +28,7 @@ jar {
}
}
configureSourcesJar()
RepoArtifacts.sourcesJar(project)
RepoArtifacts.javadocJar(project)
compileKotlin {
+1 -1
View File
@@ -28,7 +28,7 @@ jar {
}
}
configureSourcesJar()
RepoArtifacts.sourcesJar(project)
RepoArtifacts.javadocJar(project)
compileKotlin {
+1 -1
View File
@@ -66,7 +66,7 @@ jar {
manifestAttributes(manifest, project, 'Main')
}
configureSourcesJar()
RepoArtifacts.sourcesJar(project)
RepoArtifacts.javadocJar(project)
sourcesJar.dependsOn(":prepare:build.version:writeStdlibVersion")
+1 -1
View File
@@ -5,7 +5,7 @@ apply plugin: 'kotlin'
JvmToolchain.configureJvmToolchain(project, JdkMajorVersion.JDK_1_8)
configurePublishing(project)
configureSourcesJar()
RepoArtifacts.sourcesJar(project)
RepoArtifacts.javadocJar(project)
sourceSets {
+1 -1
View File
@@ -3,7 +3,7 @@ description = 'Kotlin Standard Library JDK 8 extension'
apply plugin: 'kotlin'
configurePublishing(project)
configureSourcesJar()
RepoArtifacts.sourcesJar(project)
RepoArtifacts.javadocJar(project)
dependencies {
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -22,7 +22,7 @@ jar {
manifestAttributes(manifest, project, 'Main')
}
configureSourcesJar()
RepoArtifacts.sourcesJar(project)
RepoArtifacts.javadocJar(project)
compileKotlin {