Skip to content

Commit 45f06ef

Browse files
authored
Merge pull request #54 from biafra23/publish-to-maven-local
Publish artifact to local maven repo
2 parents 98c511b + c7bb9d5 commit 45f06ef

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed

build.gradle.kts

-5
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@ subprojects {
3030
useJUnitPlatform()
3131
}
3232

33-
configure<JavaPluginExtension> {
34-
withSourcesJar()
35-
withJavadocJar()
36-
}
37-
3833
afterEvaluate {
3934

4035
dependencies {

lib/build.gradle

+26-1
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,36 @@ plugins {
1818

1919

2020
apply plugin: "kotlin"
21-
apply plugin: 'maven'
21+
apply plugin: 'maven-publish'
2222
apply plugin: 'com.github.ben-manes.versions'
2323

2424
group = 'com.github.ligi'
25+
version = '0.16.0-SNAPSHOT'
2526

27+
tasks.register('sourceJar', Jar.class) {
28+
archiveClassifier.set('sources')
29+
from sourceSets.main.allSource
30+
}
31+
32+
tasks.register('javadocJar', Jar.class) {
33+
archiveClassifier.set('javadoc')
34+
from javadoc.destinationDir
35+
dependsOn javadoc
36+
}
37+
38+
publishing {
39+
publications {
40+
maven(MavenPublication) {
41+
from components.java
42+
artifactId = "ipfs-api-kotlin"
43+
artifact(tasks.named('sourceJar').get())
44+
artifact(tasks.named('javadocJar').get())
45+
}
46+
}
47+
repositories {
48+
mavenLocal()
49+
}
50+
}
2651
repositories {
2752
jcenter()
2853
}

0 commit comments

Comments
 (0)