Skip to content

Commit 2ccb205

Browse files
committed
Use shadowjar plugin to fix kotlin compat issues.
1 parent 47f8557 commit 2ccb205

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

build.gradle

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,37 @@
1+
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
2+
13
plugins {
2-
id 'java-library'
4+
id 'java'
35
id 'signing'
46
id 'maven-publish'
57
id('io.github.gradle-nexus.publish-plugin') version '1.1.0'
8+
id("com.github.johnrengelman.shadow") version "7.1.2"
69
}
710

811
repositories {
912
mavenCentral()
1013
}
1114

1215
group = 'org.typesense'
13-
version = '0.0.8'
16+
version = '0.0.9-beta2'
1417
sourceCompatibility = 1.8
1518
targetCompatibility = 1.8
1619

17-
jar {
20+
shadowJar {
21+
archiveBaseName.set("typesense-java")
22+
mergeServiceFiles()
23+
duplicatesStrategy(DuplicatesStrategy.EXCLUDE)
24+
1825
manifest {
1926
attributes "Main-Class": "org.typesense.api.Client"
2027
}
2128

22-
from {
23-
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
24-
} {
25-
exclude "META-INF/*.SF"
26-
exclude "META-INF/*.DSA"
27-
exclude "META-INF/*.RSA"
28-
duplicatesStrategy(DuplicatesStrategy.EXCLUDE)
29-
}
29+
// @see https://youtrack.jetbrains.com/issue/KT-25709
30+
exclude("**/*.kotlin_metadata")
31+
exclude("**/*.kotlin_builtins")
3032

33+
// remove suffix `-all` as intellij can't find the library otherwise
34+
archiveClassifier.set("")
3135
}
3236

3337
sourceSets {

0 commit comments

Comments
 (0)