Skip to content

Commit

Permalink
MiraiNative: upload to bintray
Browse files Browse the repository at this point in the history
  • Loading branch information
PeratX committed Sep 28, 2020
1 parent 8756583 commit c0a3fad
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
plugins {
kotlin("jvm") version "1.4.10"
kotlin("plugin.serialization") version "1.4.10"
id("com.jfrog.bintray") version "1.8.5"
`maven-publish`
}

group = "org.itxtech"
version = "1.9.2"
description = "强大的 mirai 原生插件加载器。"
val vcs = "https://github.com/iTXTech/mirai-native"

kotlin {
sourceSets {
Expand Down Expand Up @@ -39,3 +43,45 @@ tasks.named<Jar>("jar") {
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}

bintray {
user = property("buser") as String?
key = property("bkey") as String?
setPublications("mavenJava")
setConfigurations("archives")
pkg.apply {
repo = "mirai"
name = "mirai-native"
userOrg = "itxtech"
setLicenses("AGPLv3")
publicDownloadNumbers = true
vcsUrl = vcs
}
}

@Suppress("DEPRECATION")
val sourcesJar by tasks.registering(Jar::class) {
classifier = "sources"
from(sourceSets["main"].allSource)
}

publishing {
publications {
register("mavenJava", MavenPublication::class) {
from(components["java"])

groupId = rootProject.group.toString()
this.artifactId = artifactId
version = version

pom.withXml {
val root = asNode()
root.appendNode("description", description)
root.appendNode("name", project.name)
root.appendNode("url", vcs)
root.children().last()
}
artifact(sourcesJar.get())
}
}
}

0 comments on commit c0a3fad

Please sign in to comment.