Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Nekoer committed Apr 27, 2022
1 parent 73fbe2a commit f212a0c
Showing 1 changed file with 11 additions and 85 deletions.
96 changes: 11 additions & 85 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,13 @@ plugins {
kotlin("jvm") version kotlinVersion
kotlin("plugin.serialization") version kotlinVersion

`maven-publish`
signing
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"

id("me.him188.maven-central-publish") version "1.0.0-dev-3"

id("net.mamoe.mirai-console") version "2.11.0-M2.2"
}

group = "com.hcyacg"
version = "1.1.1"
version = "1.1.2"

repositories {
mavenCentral()
Expand Down Expand Up @@ -50,86 +47,15 @@ tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach
}


java {
withJavadocJar()
withSourcesJar()
}

tasks.register<Zip>("stuffZip") {
archiveBaseName.set("stuff")
from("src/stuff")
}

publishing {
publications {
create<MavenPublication>("mavenJava") {
artifactId = rootProject.name
from(components["java"])
versionMapping {
usage("java-api") {
fromResolutionOf("runtimeClasspath")
}
usage("java-runtime") {
fromResolutionResult()
}
}
pom {
name.set(rootProject.name)
description.set("The Robot Kotlin SDK on Tencent Channel")
url.set("https://github.com/Nekoer/mirai-plugins-bilibili")
// properties.set(mapOf(
// "myProp" to "value",
// "prop.with.dots" to "anotherValue"
// ))
licenses {
license {
name.set("GNU AFFERO GENERAL PUBLIC LICENSE, Version 3.0")
url.set("https://www.gnu.org/licenses/agpl-3.0.en.html")
}
}
developers {
developer {
id.set("Nekoer")
name.set("Nekoer")
email.set("[email protected]")
}
}
scm {
connection.set("scm:git:git://github.com/Nekoer/mirai-plugins-bilibili.git")
developerConnection.set("scm:git:ssh://github.com/Nekoer/mirai-plugins-bilibili.git")
url.set("https://github.com/Nekoer/mirai-plugins-bilibili")
}
}
}
}
repositories {
maven {
// change URLs to point to your repos, e.g. http://my.org/repo
val releasesRepoUrl = uri(layout.buildDirectory.dir("repos/releases"))
val snapshotsRepoUrl = uri(layout.buildDirectory.dir("repos/snapshots"))
url = if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl
}
}
}

signing {
sign(publishing.publications["mavenJava"])
}

tasks.javadoc {
if (JavaVersion.current().isJava9Compatible) {
(options as StandardJavadocDocletOptions).addBooleanOption("html5", true)
}
}

nexusPublishing {
repositories {
sonatype { //only for users registered in Sonatype after 24 Feb 2021
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
mavenCentralPublish {
artifactId = "BiliBili"
groupId = "com.hcyacg"
projectName = "mirai plugins bilibili"
// description from project.description by default
githubProject("Nekoer", "mirai-plugins-bilibili")

username.set(properties["myNexusTokenUsername"].toString())
password.set(properties["myNexusTokenPassword"].toString())
}
}
useCentralS01()
singleDevGithubProject("Nekoer", "mirai-plugins-bilibili")
licenseFromGitHubProject("AGPL-3.0", "master")
}

0 comments on commit f212a0c

Please sign in to comment.