Keep JCenter package; Re-enable gradle plugin publish

This commit is contained in:
Karlatemp 2021-02-07 15:28:29 +08:00
parent fb2632073b
commit a0666635d5
No known key found for this signature in database
GPG Key ID: 21FBDDF664FF06F8
2 changed files with 13 additions and 10 deletions

View File

@ -112,13 +112,12 @@ jobs:
./gradlew ./gradlew
:mirai-console-compiler-annotations:publish --info :mirai-console-compiler-annotations:publish --info
# TEMP DISABLE - name: Publish Gradle plugin
# - name: Publish Gradle plugin run: >
# run: > ./gradlew
# ./gradlew :mirai-console-gradle:publishPlugins --info --stacktrace
# :mirai-console-gradle:publishPlugins --info --stacktrace -Dgradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }} -Pgradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }}
# -Dgradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }} -Pgradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }} -Dgradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }} -Pgradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }}
# -Dgradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }} -Pgradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }}
- name: Gradle :ci-release-helper:closeAndReleaseRepository - name: Gradle :ci-release-helper:closeAndReleaseRepository
run: > run: >

View File

@ -22,7 +22,9 @@ import org.gradle.kotlin.dsl.get
import org.gradle.kotlin.dsl.register import org.gradle.kotlin.dsl.register
import org.gradle.kotlin.dsl.registering import org.gradle.kotlin.dsl.registering
fun Project.configureRemoteRepos() { fun Project.configureRemoteRepos(
bintrayPkgName: String = "mirai-core"
) {
tasks.register("ensureBintrayAvailable") { tasks.register("ensureBintrayAvailable") {
doLast { doLast {
if (!project.isBintrayAvailable()) { if (!project.isBintrayAvailable()) {
@ -64,7 +66,7 @@ fun Project.configureRemoteRepos() {
if (isBintrayAvailable()) { if (isBintrayAvailable()) {
maven { maven {
setUrl("https://api.bintray.com/maven/him188moe/mirai/mirai-core/;publish=1;override=1") setUrl("https://api.bintray.com/maven/him188moe/mirai/$bintrayPkgName/;publish=1;override=1")
credentials { credentials {
username = Bintray.getUser(project) username = Bintray.getUser(project)
@ -86,7 +88,9 @@ inline fun Project.configurePublishing(
bintrayPkgName: String = artifactId, bintrayPkgName: String = artifactId,
vcs: String = "https://github.com/mamoe/mirai" vcs: String = "https://github.com/mamoe/mirai"
) { ) {
configureRemoteRepos() configureRemoteRepos(
bintrayPkgName = bintrayPkgName
)
apply<ShadowPlugin>() apply<ShadowPlugin>()
if (project.isBintrayAvailable()) { if (project.isBintrayAvailable()) {