@@ -72,11 +72,41 @@ artifacts {
7272 }
7373}
7474
75+ tasks.jar {
76+ archiveClassifier.set(" -slim" )
77+ manifest {
78+ attributes[" Specification-Title" ] = project.name
79+ attributes[" Specification-Version" ] = project.version
80+ attributes[" Implementation-Title" ] = " com.sourcegraph.lsif-kotlin"
81+ attributes[" Implementation-Version" ] = project.version
82+ }
83+ }
84+
85+ tasks.shadowJar {
86+ archiveClassifier.set(" " )
87+ relocate(" com.intellij" , " org.jetbrains.kotlin.com.intellij" )
88+ minimize()
89+ }
90+
91+ val sourceJar = task<Jar >(" sourceJar" ) {
92+ dependsOn(tasks.classes)
93+ archiveClassifier.set(" sources" )
94+ from(sourceSets.main.get().allSource)
95+ }
96+
97+ val javadocJar = task<Jar >(" javadocJar" ) {
98+ dependsOn(tasks.javadoc)
99+ archiveClassifier.set(" javadoc" )
100+ from(tasks.javadoc.get().destinationDir)
101+ }
102+
75103publishing {
76104 publications {
77105 create<MavenPublication >(" shadow" ) {
78106 this .apply {
79107 pom {
108+ name.set(" semanticdb-kotlinc" )
109+ description.set(" A kotlinc plugin to emit SemanticDB information" )
80110 url.set(" https://github.com/sourcegraph/lsif-kotlin" )
81111 developers {
82112 developer {
@@ -90,11 +120,19 @@ publishing {
9012091121 }
92122 }
123+ licenses {
124+ license {
125+ name.set(" The Apache License, Version 2.0" )
126+ url.set(" https://www.apache.org/licenses/LICENSE-2.0.txt" )
127+ }
128+ }
93129 scm {
94130 url.set(" https://github.com/sourcegraph/lsif-kotlin" )
95131 }
96132 }
97133 shadow.component(this )
134+ artifact(sourceJar)
135+ artifact(javadocJar)
98136 }
99137 }
100138 }
@@ -135,22 +173,6 @@ tasks.test {
135173 }
136174}
137175
138- tasks.jar {
139- archiveClassifier.set(" -slim" )
140- manifest {
141- attributes[" Specification-Title" ] = project.name
142- attributes[" Specification-Version" ] = project.version
143- attributes[" Implementation-Title" ] = " com.sourcegraph.lsif-kotlin"
144- attributes[" Implementation-Version" ] = project.version
145- }
146- }
147-
148- tasks.shadowJar {
149- archiveClassifier.set(" " )
150- relocate(" com.intellij" , " org.jetbrains.kotlin.com.intellij" )
151- minimize()
152- }
153-
154176subprojects {
155177 apply (plugin = " org.jetbrains.kotlin.jvm" )
156178
0 commit comments