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
:mirai-console-compiler-annotations:publish --info
# TEMP DISABLE
# - name: Publish Gradle plugin
# run: >
# ./gradlew
# :mirai-console-gradle:publishPlugins --info --stacktrace
# -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 }}
- name: Publish Gradle plugin
run: >
./gradlew
:mirai-console-gradle:publishPlugins --info --stacktrace
-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 }}
- name: Gradle :ci-release-helper:closeAndReleaseRepository
run: >

View File

@ -22,7 +22,9 @@ import org.gradle.kotlin.dsl.get
import org.gradle.kotlin.dsl.register
import org.gradle.kotlin.dsl.registering
fun Project.configureRemoteRepos() {
fun Project.configureRemoteRepos(
bintrayPkgName: String = "mirai-core"
) {
tasks.register("ensureBintrayAvailable") {
doLast {
if (!project.isBintrayAvailable()) {
@ -64,7 +66,7 @@ fun Project.configureRemoteRepos() {
if (isBintrayAvailable()) {
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 {
username = Bintray.getUser(project)
@ -86,7 +88,9 @@ inline fun Project.configurePublishing(
bintrayPkgName: String = artifactId,
vcs: String = "https://github.com/mamoe/mirai"
) {
configureRemoteRepos()
configureRemoteRepos(
bintrayPkgName = bintrayPkgName
)
apply<ShadowPlugin>()
if (project.isBintrayAvailable()) {