Skip to content
This repository was archived by the owner on Nov 26, 2023. It is now read-only.

Commit 167dccd

Browse files
committed
Upload sources jar as well
1 parent befb37d commit 167dccd

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
- ~/.gradle
3939
key: v1-dependencies-{{ checksum "build.gradle.kts" }}
4040

41+
- run: ./gradlew clean
4142
- run: ./gradlew build
4243

4344
# run tests!

build.gradle.kts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ plugins {
2828
}
2929

3030
project.group = "com.dunctebot"
31-
project.version = "1.0.0"
31+
project.version = "1.0.1"
3232
val archivesBaseName = "sourcemanagers"
3333

3434
repositories {
@@ -55,7 +55,23 @@ tasks.withType<Wrapper> {
5555
}
5656

5757
val bintrayUpload: BintrayUploadTask by tasks
58+
val jar: Jar by tasks
5859
val build: Task by tasks
60+
val clean: Task by tasks
61+
62+
val sourcesJar = task<Jar>("sourcesJar") {
63+
archiveClassifier.set("sources")
64+
from(sourceSets["main"].allJava)
65+
}
66+
67+
build.apply {
68+
// dependsOn(clean)
69+
dependsOn(jar)
70+
dependsOn(sourcesJar)
71+
72+
jar.mustRunAfter(clean)
73+
sourcesJar.mustRunAfter(jar)
74+
}
5975

6076
bintrayUpload.apply {
6177
dependsOn(build)
@@ -68,6 +84,7 @@ publishing {
6884
publications {
6985
register("BintrayRelease", MavenPublication::class) {
7086
from(components["java"])
87+
artifact(sourcesJar)
7188

7289
artifactId = archivesBaseName
7390
groupId = project.group as String

0 commit comments

Comments
 (0)