|
|
@@ -9,39 +9,26 @@ plugins {
|
|
|
}
|
|
|
|
|
|
val ktorVersion: String by rootProject.extra
|
|
|
-fun org.jetbrains.kotlin.gradle.plugin.KotlinDependencyHandler.ktorApi(id: String, version: String = ktorVersion) {
|
|
|
- api("io.ktor:ktor-$id:$version") {
|
|
|
- exclude(group = "org.jetbrains.kotlin")
|
|
|
- exclude(group = "org.jetbrains.kotlinx")
|
|
|
- exclude(module = "slf4j-api")
|
|
|
- }
|
|
|
-}
|
|
|
|
|
|
-kotlin {
|
|
|
- sourceSets["test"].apply {
|
|
|
- dependencies {
|
|
|
- api("net.mamoe.yamlkt:yamlkt:0.10.2")
|
|
|
- api("org.slf4j:slf4j-simple:1.7.26")
|
|
|
- api(kotlin("test-junit5"))
|
|
|
- ktorApi("server-test-host")
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- sourceSets.all {
|
|
|
- languageSettings.optIn("kotlin.Experimental")
|
|
|
-
|
|
|
- dependencies {
|
|
|
- compileOnly("net.mamoe.yamlkt:yamlkt:0.9.0")
|
|
|
-
|
|
|
- ktorApi("client-okhttp")
|
|
|
- ktorApi("server-cio")
|
|
|
- ktorApi("http-jvm")
|
|
|
- ktorApi("websockets")
|
|
|
- ktorApi("client-websockets")
|
|
|
- ktorApi("server-core")
|
|
|
- ktorApi("http")
|
|
|
- }
|
|
|
- }
|
|
|
+dependencies {
|
|
|
+
|
|
|
+ implementation(project(":mirai-api-http-spi"))
|
|
|
+
|
|
|
+ // compile
|
|
|
+ ktorImplementation("server-core")
|
|
|
+ ktorImplementation("websockets")
|
|
|
+ ktorImplementation("client-websockets")
|
|
|
+ ktorImplementation("server-cio")
|
|
|
+ ktorImplementation("client-okhttp")
|
|
|
+ ktorImplementation("http-jvm")
|
|
|
+ ktorImplementation("http")
|
|
|
+ implementation("net.mamoe.yamlkt:yamlkt:0.10.2")
|
|
|
+
|
|
|
+ // test
|
|
|
+ testImplementation("net.mamoe.yamlkt:yamlkt:0.10.2")
|
|
|
+ testImplementation("org.slf4j:slf4j-simple:1.7.36")
|
|
|
+ testImplementation(kotlin("test-junit5"))
|
|
|
+ ktorImplementation("server-test-host")
|
|
|
}
|
|
|
|
|
|
val httpVersion: String by rootProject.extra
|
|
|
@@ -77,33 +64,6 @@ mavenCentralPublish {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-/*
|
|
|
-Publication Preview
|
|
|
-
|
|
|
-Root module:
|
|
|
- GroupId: net.mamoe
|
|
|
- ArtifactId: mirai-api-http
|
|
|
- Version: 2.5.0
|
|
|
-
|
|
|
-Your project targets JVM platform only.
|
|
|
-Gradle users can add dependency by `implementation("net.mamoe:mirai-api-http:2.5.0")`.
|
|
|
-Maven users can add dependency as follows:
|
|
|
-<dependency>
|
|
|
- <groupId>net.mamoe</groupId>
|
|
|
- <artifactId>mirai-api-http</artifactId>
|
|
|
- <version>2.5.0</version>
|
|
|
-</dependency>
|
|
|
-
|
|
|
-There are some extra files that are going to be published:
|
|
|
-
|
|
|
-[jvm]
|
|
|
-mirai-api-http-2.5.0.mirai2.jar (extension=mirai2.jar, classifier=null)
|
|
|
-mirai-api-http-2.5.0.mirai.jar (extension=mirai.jar, classifier=null)
|
|
|
-mirai-api-http-2.5.0-all.jar (extension=jar, classifier=all)
|
|
|
-
|
|
|
-Publication Preview End
|
|
|
- */
|
|
|
-
|
|
|
tasks {
|
|
|
compileKotlin {
|
|
|
kotlinOptions.jvmTarget = "1.8"
|
|
|
@@ -111,4 +71,11 @@ tasks {
|
|
|
compileTestKotlin {
|
|
|
kotlinOptions.jvmTarget = "1.8"
|
|
|
}
|
|
|
-}
|
|
|
+}
|
|
|
+
|
|
|
+kotlin {
|
|
|
+ sourceSets.all {
|
|
|
+ languageSettings.optIn("kotlin.Experimental")
|
|
|
+ languageSettings.optIn("kotlin.RequiresOptIn")
|
|
|
+ }
|
|
|
+}
|