Fix publishing and add mirai-core-all

This commit is contained in:
Him188 2020-12-17 12:41:44 +08:00
parent ee36735632
commit bf88731086
6 changed files with 33 additions and 10 deletions

View File

@ -26,14 +26,33 @@ jobs:
run: ./gradlew clean
- name: Gradle build
run: ./gradlew build # if test's failed, don't publish
- name: Check keys
run: ./gradlew :mirai-core:ensureBintrayAvailable :mirai-core-qqandroid:ensureBintrayAvailable -Dbintray_user=${{ secrets.BINTRAY_USER }} -Pbintray_user=${{ secrets.BINTRAY_USER }} -Dbintray_key=${{ secrets.BINTRAY_KEY }} -Pbintray_key=${{ secrets.BINTRAY_KEY }}
run: ./gradlew :mirai-core-utils:ensureBintrayAvailable
:mirai-core-api:ensureBintrayAvailable
:mirai-core:ensureBintrayAvailable
-Dbintray_user=${{ secrets.BINTRAY_USER }} -Pbintray_user=${{ secrets.BINTRAY_USER }}
-Dbintray_key=${{ secrets.BINTRAY_KEY }} -Pbintray_key=${{ secrets.BINTRAY_KEY }}
- name: Gradle :mirai-core-utils:publish
run: ./gradlew :mirai-core-utils:publish
-Dbintray_user=${{ secrets.BINTRAY_USER }} -Pbintray_user=${{ secrets.BINTRAY_USER }}
-Dbintray_key=${{ secrets.BINTRAY_KEY }} -Pbintray_key=${{ secrets.BINTRAY_KEY }}
- name: Gradle :mirai-core-api:publish
run: ./gradlew :mirai-core-api:publish
-Dbintray_user=${{ secrets.BINTRAY_USER }} -Pbintray_user=${{ secrets.BINTRAY_USER }}
-Dbintray_key=${{ secrets.BINTRAY_KEY }} -Pbintray_key=${{ secrets.BINTRAY_KEY }}
- name: Gradle :mirai-core:publish
run: ./gradlew :mirai-core:publish -Dbintray_user=${{ secrets.BINTRAY_USER }} -Pbintray_user=${{ secrets.BINTRAY_USER }} -Dbintray_key=${{ secrets.BINTRAY_KEY }} -Pbintray_key=${{ secrets.BINTRAY_KEY }}
- name: Gradle :mirai-core-qqandroid:publish
run: ./gradlew :mirai-core-qqandroid:publish -Dbintray_user=${{ secrets.BINTRAY_USER }} -Pbintray_user=${{ secrets.BINTRAY_USER }} -Dbintray_key=${{ secrets.BINTRAY_KEY }} -Pbintray_key=${{ secrets.BINTRAY_KEY }}
run: ./gradlew :mirai-core:publish
-Dbintray_user=${{ secrets.BINTRAY_USER }} -Pbintray_user=${{ secrets.BINTRAY_USER }}
-Dbintray_key=${{ secrets.BINTRAY_KEY }} -Pbintray_key=${{ secrets.BINTRAY_KEY }}
- name: Gradle :mirai-core-all:bintrayUpload
run: ./gradlew :mirai-core-all:bintrayUpload -Dbintray_user=${{ secrets.BINTRAY_USER }} -Pbintray_user=${{ secrets.BINTRAY_USER }} -Dbintray_key=${{ secrets.BINTRAY_KEY }} -Pbintray_key=${{ secrets.BINTRAY_KEY }}
run: ./gradlew :mirai-core-all:bintrayUpload
-Dbintray_user=${{ secrets.BINTRAY_USER }} -Pbintray_user=${{ secrets.BINTRAY_USER }}
-Dbintray_key=${{ secrets.BINTRAY_KEY }} -Pbintray_key=${{ secrets.BINTRAY_KEY }}
# - name: Upload artifact
# uses: actions/upload-artifact@v1.0.0

View File

@ -21,14 +21,14 @@ import org.gradle.api.attributes.Attribute
*/
object Versions {
const val project = "2.0-M1"
const val project = "2.0-M1-dev-1"
const val kotlinCompiler = "1.4.21"
const val kotlinStdlib = "1.4.21"
const val coroutines = "1.4.1"
const val atomicFU = "0.14.4"
const val serialization = "1.0.1"
const val ktor = "1.4.2"
const val ktor = "1.4.3"
const val binaryValidator = "0.2.3"

View File

@ -122,7 +122,7 @@ afterEvaluate {
// With Kotlin 1.4.0, the root module ID has no suffix, but for compatibility with
// the consumers who can't read Gradle module metadata, we publish the JVM artifacts in it
it.artifactId = variantName
publishPlatformArtifactsInRootModule(publications["jvm"])
// publishPlatformArtifactsInRootModule(publications["jvm"])
}
break

View File

@ -32,6 +32,9 @@ tasks.withType(JavaCompile::class.java) {
kotlin {
explicitApi()
target {
attributes.attribute(ATTRIBUTE_MIRAI_TARGET_PLATFORM, "jvm")
}
}
dependencies {

View File

@ -55,11 +55,11 @@ kotlin {
}
jvm("common") {
attributes.attribute(Attribute.of("mirai.target.platform", String::class.java), "common")
attributes.attribute(ATTRIBUTE_MIRAI_TARGET_PLATFORM, "common")
}
jvm("jvm") {
attributes.attribute(Attribute.of("mirai.target.platform", String::class.java), "jvm")
attributes.attribute(ATTRIBUTE_MIRAI_TARGET_PLATFORM, "jvm")
}
// jvm("android") {

View File

@ -24,4 +24,5 @@ rootProject.name = "mirai"
include(":mirai-core-utils")
include(":mirai-core-api")
include(":mirai-core")
include(":mirai-core-all")
// include(":mirai-core-all")