8000 Magic stuff · DuncteBot/skybot-source-managers@bc7e20a · GitHub
[go: up one dir, main page]

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

Commit bc7e20a

Browse files
committed
Magic stuff
1 parent 324bba9 commit bc7e20a

File tree

1 file changed

+48
-2
lines changed

1 file changed

+48
-2
lines changed

build.gradle.kts

+48-2
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,21 @@
1515
*/
1616

1717
import org.gradle.api.tasks.wrapper.Wrapper.DistributionType
18+
import com.jfrog.bintray.gradle.BintrayExtension
19+
import com.jfrog.bintray.gradle.tasks.BintrayUploadTask
20+
import java.util.*
1821

1922
plugins {
2023
idea
2124
`java-library`
2225
`maven-publish`
26+
27+
id("com.jfrog.bintray") version "1.8.1"
2328
}
2429

25-
group = "com.dunctebot.sourcemanagers"
26-
version = "1.0-SNAPSHOT"
30+
project.group = "com.dunctebot"
31+
project.version = "1.0.0"
32+
val archivesBaseName = "sourcemanagers"
2733

2834
repositories {
2935
jcenter()
@@ -47,3 +53,43 @@ tasks.withType<Wrapper> {
4753
distributionType = DistributionType.ALL
4854
gradleVersion = "5.6.3"
4955
}
56+
57+
val bintrayUpload: BintrayUploadTask by tasks
58+
val build: Task by tasks
59+
60+
bintrayUpload.apply {
61+
dependsOn(build)
62+
63+
onlyIf { System.getenv("BINTRAY_USER") != null }
64+
onlyIf { System.getenv("BINTRAY_KEY") != null }
65+
}
66+
67+
publishing {
68+
publications {
69+
register("BintrayRelease", MavenPublication::class) {
70+
from(components["java"])
71+
72+
artifactId = archivesBaseName
73+
groupId = project.group as String
74+
version = project.version as String
75+
}
76+
}
77+
}
78+
79+
bintray {
80+
user = System.getenv("BINTRAY_USER")
81+
key = System.getenv("BINTRAY_KEY")
82+
setPublications("BintrayRelease")
83+
pkg(delegateClosureOf<BintrayExtension.PackageConfig> {
84+
repo = "maven"
85+
name = "sourcemanagers"
86+
setLicenses("Apache-2.0")
87+
vcsUrl = "https://github.com/dunctebot/skybot-source-managers.git"
88+
publish = true
89+
version(delegateClosureOf<BintrayExtension.VersionConfig> {
90+
name = project.version as String
91+
released = Date().toString()
92+
})
93+
})
94+
}
95+

0 commit comments

Comments
 (0)
0