Build: Use maven-publish in configurePublishing helper
This commit is contained in:
@@ -116,6 +116,10 @@ ext.signPom = { Project project, MavenDeployer deployer ->
|
|||||||
}
|
}
|
||||||
|
|
||||||
ext.configurePublishing = { Project project ->
|
ext.configurePublishing = { Project project ->
|
||||||
|
ArtifactsKt.publish(project, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
ext.configureLegacyPublishing = { Project project ->
|
||||||
project.configure(project) {
|
project.configure(project) {
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven'
|
||||||
|
|
||||||
|
|||||||
@@ -17,13 +17,5 @@ jar {
|
|||||||
manifestAttributes(manifest, project, 'Test')
|
manifestAttributes(manifest, project, 'Test')
|
||||||
}
|
}
|
||||||
|
|
||||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
configureSourcesJar()
|
||||||
classifier = 'sources'
|
|
||||||
from sourceSets.main.kotlin
|
|
||||||
}
|
|
||||||
|
|
||||||
artifacts {
|
|
||||||
archives sourcesJar
|
|
||||||
}
|
|
||||||
|
|
||||||
configureJavadocJar()
|
configureJavadocJar()
|
||||||
@@ -13,15 +13,7 @@ jar {
|
|||||||
manifestAttributes(manifest, project, 'Test')
|
manifestAttributes(manifest, project, 'Test')
|
||||||
}
|
}
|
||||||
|
|
||||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
configureSourcesJar()
|
||||||
classifier = 'sources'
|
|
||||||
from sourceSets.main.kotlin
|
|
||||||
}
|
|
||||||
|
|
||||||
artifacts {
|
|
||||||
archives sourcesJar
|
|
||||||
}
|
|
||||||
|
|
||||||
configureJavadocJar()
|
configureJavadocJar()
|
||||||
|
|
||||||
tasks.withType(org.jetbrains.kotlin.gradle.dsl.KotlinCompile) {
|
tasks.withType(org.jetbrains.kotlin.gradle.dsl.KotlinCompile) {
|
||||||
|
|||||||
@@ -2,7 +2,8 @@ description = 'Kotlin Test for JS'
|
|||||||
|
|
||||||
apply plugin: 'kotlin-platform-js'
|
apply plugin: 'kotlin-platform-js'
|
||||||
|
|
||||||
configurePublishing(project)
|
// TODO: Migrate to maven-publish publishing
|
||||||
|
configureLegacyPublishing(project)
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
sources
|
sources
|
||||||
|
|||||||
@@ -27,11 +27,7 @@ jar {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
artifacts {
|
configureSourcesJar()
|
||||||
archives sourcesJar
|
|
||||||
sources sourcesJar
|
|
||||||
}
|
|
||||||
|
|
||||||
configureJavadocJar()
|
configureJavadocJar()
|
||||||
|
|
||||||
compileKotlin {
|
compileKotlin {
|
||||||
|
|||||||
@@ -32,11 +32,7 @@ jar {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
artifacts {
|
configureSourcesJar()
|
||||||
archives sourcesJar
|
|
||||||
sources sourcesJar
|
|
||||||
}
|
|
||||||
|
|
||||||
configureJavadocJar()
|
configureJavadocJar()
|
||||||
|
|
||||||
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
|
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ description = 'Kotlin Test'
|
|||||||
apply plugin: 'kotlin-platform-jvm'
|
apply plugin: 'kotlin-platform-jvm'
|
||||||
|
|
||||||
configureJvm6Project(project)
|
configureJvm6Project(project)
|
||||||
configurePublishing(project)
|
// TODO: Migrate to maven-publish publishing
|
||||||
|
configureLegacyPublishing(project)
|
||||||
|
|
||||||
def includeJava9 = BuildPropertiesExtKt.getIncludeJava9(project.kotlinBuildProperties)
|
def includeJava9 = BuildPropertiesExtKt.getIncludeJava9(project.kotlinBuildProperties)
|
||||||
|
|
||||||
|
|||||||
@@ -30,11 +30,7 @@ jar {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
artifacts {
|
configureSourcesJar()
|
||||||
archives sourcesJar
|
|
||||||
sources sourcesJar
|
|
||||||
}
|
|
||||||
|
|
||||||
configureJavadocJar()
|
configureJavadocJar()
|
||||||
|
|
||||||
compileKotlin {
|
compileKotlin {
|
||||||
|
|||||||
@@ -62,20 +62,7 @@ jar {
|
|||||||
manifestAttributes(manifest, project, 'Main')
|
manifestAttributes(manifest, project, 'Main')
|
||||||
}
|
}
|
||||||
|
|
||||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
configureSourcesJar()
|
||||||
classifier = 'sources'
|
|
||||||
from sourceSets.main.kotlin
|
|
||||||
}
|
|
||||||
|
|
||||||
configurations {
|
|
||||||
sources
|
|
||||||
}
|
|
||||||
|
|
||||||
artifacts {
|
|
||||||
archives sourcesJar
|
|
||||||
sources sourcesJar
|
|
||||||
}
|
|
||||||
|
|
||||||
configureJavadocJar()
|
configureJavadocJar()
|
||||||
|
|
||||||
classes.setDependsOn(classes.dependsOn.findAll { it != "compileJava" })
|
classes.setDependsOn(classes.dependsOn.findAll { it != "compileJava" })
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ description = 'Kotlin Standard Library JDK 7 extension'
|
|||||||
apply plugin: 'kotlin'
|
apply plugin: 'kotlin'
|
||||||
|
|
||||||
configureJvm6Project(project)
|
configureJvm6Project(project)
|
||||||
configurePublishing(project)
|
// TODO: Migrate to maven-publish publishing
|
||||||
|
configureLegacyPublishing(project)
|
||||||
ext.javaHome = JDK_17
|
ext.javaHome = JDK_17
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ description = 'Kotlin Standard Library JDK 8 extension'
|
|||||||
apply plugin: 'kotlin'
|
apply plugin: 'kotlin'
|
||||||
|
|
||||||
configureJvm6Project(project)
|
configureJvm6Project(project)
|
||||||
configurePublishing(project)
|
// TODO: Migrate to maven-publish publishing
|
||||||
|
configureLegacyPublishing(project)
|
||||||
ext.javaHome = JDK_18
|
ext.javaHome = JDK_18
|
||||||
ext.jvmTarget = "1.8"
|
ext.jvmTarget = "1.8"
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,8 @@ description = 'Kotlin Standard Library for JS'
|
|||||||
apply plugin: 'kotlin-platform-js'
|
apply plugin: 'kotlin-platform-js'
|
||||||
apply plugin: 'idea'
|
apply plugin: 'idea'
|
||||||
|
|
||||||
configurePublishing(project)
|
// TODO: Migrate to maven-publish publishing
|
||||||
|
configureLegacyPublishing(project)
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
sources
|
sources
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ apply plugin: 'kotlin-platform-jvm'
|
|||||||
archivesBaseName = 'kotlin-stdlib'
|
archivesBaseName = 'kotlin-stdlib'
|
||||||
|
|
||||||
configureJvm6Project(project)
|
configureJvm6Project(project)
|
||||||
configurePublishing(project)
|
// TODO: Migrate to maven-publish publishing
|
||||||
|
configureLegacyPublishing(project)
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
distSources
|
distSources
|
||||||
|
|||||||
@@ -20,7 +20,8 @@ ext.pluginMarkerProject = { String pluginProjectId ->
|
|||||||
// Remove the default JAR artifact added by the Java plugin
|
// Remove the default JAR artifact added by the Java plugin
|
||||||
configurations.archives.artifacts.clear()
|
configurations.archives.artifacts.clear()
|
||||||
|
|
||||||
configurePublishing(project)
|
// TODO: Migrate to maven-publish publishing
|
||||||
|
configureLegacyPublishing(project)
|
||||||
|
|
||||||
task emptyJar(type: Jar)
|
task emptyJar(type: Jar)
|
||||||
|
|
||||||
|
|||||||
@@ -17,11 +17,7 @@ dependencies {
|
|||||||
compileOnly DependenciesKt.kotlinBuiltins(project)
|
compileOnly DependenciesKt.kotlinBuiltins(project)
|
||||||
}
|
}
|
||||||
|
|
||||||
artifacts {
|
configureSourcesJar()
|
||||||
archives sourcesJar
|
|
||||||
sources sourcesJar
|
|
||||||
}
|
|
||||||
|
|
||||||
configureJavadocJar()
|
configureJavadocJar()
|
||||||
|
|
||||||
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
|
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
|
||||||
|
|||||||
@@ -26,11 +26,10 @@ jar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
artifacts {
|
artifacts {
|
||||||
archives sourcesJar
|
|
||||||
sources sourcesJar
|
|
||||||
mainJar jar
|
mainJar jar
|
||||||
}
|
}
|
||||||
|
|
||||||
|
configureSourcesJar()
|
||||||
configureJavadocJar()
|
configureJavadocJar()
|
||||||
|
|
||||||
compileKotlin {
|
compileKotlin {
|
||||||
|
|||||||
Reference in New Issue
Block a user