Plugins renaming: kotlinx-<buildSystem>-serialization-plugin
This commit is contained in:
+4
-4
@@ -46,7 +46,7 @@ If your maven build is failing with Out-Of-Memory errors, set JVM options for ma
|
|||||||
|
|
||||||
## Kotlin serialization Gradle Plugin
|
## Kotlin serialization Gradle Plugin
|
||||||
|
|
||||||
First, build all the above. Then run `./gradlew :kotlin-serialization:install` to install it to your local maven repository.
|
First, build all the above. Then run `./gradlew :kotlinx-gradle-serialization-plugin:publishToMavenLocal` to install it to your local maven repository.
|
||||||
|
|
||||||
When it is installed in local maven repository, you can add it as a dependency in buildscript classpath and apply it:
|
When it is installed in local maven repository, you can add it as a dependency in buildscript classpath and apply it:
|
||||||
|
|
||||||
@@ -60,13 +60,13 @@ buildscript {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.1-SNAPSHOT"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.1-SNAPSHOT"
|
||||||
classpath "org.jetbrains.kotlinx:kotlin-serialization:0.1"
|
classpath "org.jetbrains.kotlinx:kotlinx-gradle-serialization-plugin:0.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'kotlin'
|
apply plugin: 'kotlin'
|
||||||
apply plugin: 'kotlin-serialization'
|
apply plugin: 'kotlinx-serialization'
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also obtain it from bintray: https://bintray.com/kotlin/kotlinx/kotlinx.serialization
|
You can also obtain it from bintray: https://bintray.com/kotlin/kotlinx/kotlinx.serialization.plugin
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<groupId>org.jetbrains.kotlinx</groupId>
|
<groupId>org.jetbrains.kotlinx</groupId>
|
||||||
<artifactId>kotlin-maven-serialization</artifactId>
|
<artifactId>kotlinx-maven-serialization-plugin</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<version>0.1</version>
|
<version>0.1</version>
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -24,7 +24,7 @@ import org.jetbrains.kotlin.maven.*
|
|||||||
|
|
||||||
val SERIALIZATION_COMPILER_PLUGIN_ID = "org.jetbrains.kotlinx.serialization"
|
val SERIALIZATION_COMPILER_PLUGIN_ID = "org.jetbrains.kotlinx.serialization"
|
||||||
|
|
||||||
@Component(role = KotlinMavenPluginExtension::class, hint = "kotlin-serialization")
|
@Component(role = KotlinMavenPluginExtension::class, hint = "kotlinx-serialization")
|
||||||
class KotlinSerializationMavenPlugin : KotlinMavenPluginExtension {
|
class KotlinSerializationMavenPlugin : KotlinMavenPluginExtension {
|
||||||
@Requirement
|
@Requirement
|
||||||
lateinit var logger: Logger
|
lateinit var logger: Logger
|
||||||
|
|||||||
@@ -47,13 +47,35 @@ jar {
|
|||||||
from(targetSrc) { include("META-INF/**") }
|
from(targetSrc) { include("META-INF/**") }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
apply plugin: 'maven-publish'
|
||||||
|
|
||||||
|
task sourceJar(type: Jar, dependsOn: classes) {
|
||||||
|
classifier 'sources'
|
||||||
|
from sourceSets.main.allSource
|
||||||
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
mavenProject(MavenPublication) {
|
||||||
|
from components.java
|
||||||
|
groupId project.group
|
||||||
|
artifactId project.name
|
||||||
|
version project.version
|
||||||
|
|
||||||
|
artifact sourceJar {
|
||||||
|
classifier "sources"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bintray {
|
bintray {
|
||||||
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
|
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
|
||||||
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
|
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
|
||||||
configurations = ['archives']
|
publications = ['mavenProject']
|
||||||
pkg {
|
pkg {
|
||||||
repo = 'kotlinx'
|
repo = 'kotlinx'
|
||||||
name = 'kotlinx.serialization'
|
name = 'kotlinx.serialization.plugin'
|
||||||
userOrg = 'kotlin'
|
userOrg = 'kotlin'
|
||||||
licenses = ['Apache-2.0']
|
licenses = ['Apache-2.0']
|
||||||
vcsUrl = 'https://github.com/JetBrains/kotlin/tree/rr/kotlinx.serialization/libraries'
|
vcsUrl = 'https://github.com/JetBrains/kotlin/tree/rr/kotlinx.serialization/libraries'
|
||||||
|
|||||||
+1
-1
@@ -38,7 +38,7 @@ class SerializationGradleSubplugin : Plugin<Project> {
|
|||||||
class SerializationKotlinGradleSubplugin : KotlinGradleSubplugin<AbstractCompile> {
|
class SerializationKotlinGradleSubplugin : KotlinGradleSubplugin<AbstractCompile> {
|
||||||
companion object {
|
companion object {
|
||||||
val SERIALIZATION_GROUP_NAME = "org.jetbrains.kotlinx"
|
val SERIALIZATION_GROUP_NAME = "org.jetbrains.kotlinx"
|
||||||
val SERIALIZATION_ARTIFACT_NAME = "kotlin-serialization"
|
val SERIALIZATION_ARTIFACT_NAME = "kotlinx-gradle-serialization-plugin"
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun isApplicable(project: Project, task: AbstractCompile) = SerializationGradleSubplugin.isEnabled(project)
|
override fun isApplicable(project: Project, task: AbstractCompile) = SerializationGradleSubplugin.isEnabled(project)
|
||||||
|
|||||||
Reference in New Issue
Block a user