build.gradle.kts 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * Copyright 2019-2021 Mamoe Technologies and contributors.
  3. *
  4. * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
  5. * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
  6. *
  7. * https://github.com/mamoe/mirai/blob/master/LICENSE
  8. */
  9. plugins {
  10. `kotlin-dsl`
  11. }
  12. repositories {
  13. mavenLocal()
  14. jcenter()
  15. mavenCentral()
  16. }
  17. kotlin {
  18. sourceSets.all {
  19. languageSettings.useExperimentalAnnotation("kotlin.Experimental")
  20. languageSettings.useExperimentalAnnotation("kotlin.RequiresOptIn")
  21. }
  22. }
  23. dependencies {
  24. fun kotlinx(id: String, version: String) = "org.jetbrains.kotlinx:kotlinx-$id:$version"
  25. fun ktor(id: String, version: String = "1.3.2") = "io.ktor:ktor-$id:$version"
  26. api("org.jsoup:jsoup:1.12.1")
  27. api("com.google.code.gson:gson:2.8.6")
  28. api(kotlinx("coroutines-core", "1.3.8"))
  29. api(ktor("client-core"))
  30. api(ktor("client-cio"))
  31. api(ktor("client-json"))
  32. compileOnly(gradleApi())
  33. compileOnly("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.0")
  34. api("com.github.jengelman.gradle.plugins:shadow:6.0.0")
  35. }