diff --git a/buildSrc/src/main/kotlin/R.kt b/buildSrc/src/main/kotlin/R.kt index 503afe5..07dd76f 100644 --- a/buildSrc/src/main/kotlin/R.kt +++ b/buildSrc/src/main/kotlin/R.kt @@ -15,15 +15,22 @@ * If not, see . */ +import love.forte.gradle.common.core.property.systemProp import love.forte.gradle.common.core.repository.Repositories import love.forte.gradle.common.core.repository.SimpleCredentials +import love.forte.gradle.common.publication.SonatypeContact import org.slf4j.LoggerFactory val logger = LoggerFactory.getLogger("Sonatype Userinfo") private val sonatypeUserInfo by lazy { val userInfo = love.forte.gradle.common.publication.sonatypeUserInfoOrNull - + + val username = systemProp(SonatypeContact.SONATYPE_USERNAME) ?: return@lazy null + val password = systemProp(SonatypeContact.SONATYPE_PASSWORD) ?: return@lazy null + logger.info("sonatype.username: {}", username) + logger.info("sonatype.password: {}", password) + if (userInfo == null) { logger.warn("sonatype.username or sonatype.password is null, cannot config nexus publishing.") } diff --git a/simbot-component-telegram-api/README.md b/simbot-component-telegram-api/README.md index f421068..149f346 100644 --- a/simbot-component-telegram-api/README.md +++ b/simbot-component-telegram-api/README.md @@ -2,6 +2,37 @@ > TODO +## Setup + +> [!note] +> Version (`VERSION` below) goes to the [releases](https://github.com/simple-robot/simbot-component-telegram/releases) reference. + +### Gradle + +`build.gradle.kts` + +```kotlin +plugins { + kotlin("...") version "..." +} + +dependencies { + implementation("love.forte.simbot.component:simbot-component-telegram-api:$VERSION") +} +``` + +### Maven + +```xml + + + love.forte.simbot.component + simbot-component-telegram-api-jvm + ${VERSION} + + +``` + ## Supports See [supports](supports.md). diff --git a/simbot-component-telegram-api/README_CN.md b/simbot-component-telegram-api/README_CN.md index a983efb..9bcd796 100644 --- a/simbot-component-telegram-api/README_CN.md +++ b/simbot-component-telegram-api/README_CN.md @@ -2,6 +2,37 @@ > TODO +## 安装 + +> [!note] +> 版本 (即下文的 `VERSION`) 前往 [releases](https://github.com/simple-robot/simbot-component-telegram/releases) 参考. + +### Gradle + +`build.gradle.kts` + +```kotlin +plugins { + kotlin("...") version "..." +} + +dependencies { + implementation("love.forte.simbot.component:simbot-component-telegram-type:$VERSION") +} +``` + +### Maven + +```xml + + + love.forte.simbot.component + simbot-component-telegram-type-jvm + ${VERSION} + + +``` + ## 支持列表 参考 [支持列表](supports.md) diff --git a/simbot-component-telegram-core/README.md b/simbot-component-telegram-core/README.md index 622cd8c..a1c1246 100644 --- a/simbot-component-telegram-core/README.md +++ b/simbot-component-telegram-core/README.md @@ -3,7 +3,88 @@ > [!caution] > WIP +## Setup +To use the simbot component library, you first need to add the core implementation of simbot +(such as the core library (`simbot-core`) or Spring Boot starter (`simbot-core-spring-boot-starter`)), +and then add the component library dependencies of the Telegram (`simbot-component-telegram-core`). + +> [!note] +> The version of simbot core implementation library (`SIMBOT_VERSION` below) goes [here](https://github.com/simple-robot/simpler-robot/releases) for reference; +> +> Telegram Component library versions (`VERSION` below) go to the [releases](https://github.com/simple-robot/simbot-component-telegram/releases) reference. + +**With simbot core** + +### Gradle + +`build.gradle.kts` + +```kotlin +plugins { + kotlin("...") version "..." +} + +dependencies { + implementation("love.forte.simbot:simbot-core:${SIMBOT_VERSION}") + implementation("love.forte.simbot.component:simbot-component-telegram-core:$VERSION") +} +``` + +### Maven + +`pom.xml` + +```xml + + + love.forte.simbot + simbot-core-jvm + ${SIMBOT_VERSION} + + + love.forte.simbot.component + simbot-component-telegram-core-jvm + ${VERSION} + + +``` + +**With simbot spring boot starter** + +### Gradle + +`build.gradle.kts` + +```kotlin +plugins { + kotlin("jvm") version "..." +} + +dependencies { + implementation("love.forte.simbot:simbot-core-spring-boot-starter:${SIMBOT_VERSION}") + implementation("love.forte.simbot.component:simbot-component-telegram-core:$VERSION") +} +``` + +### Maven + +`pom.xml` + +```xml + + + love.forte.simbot + simbot-core-spring-boot-starter + ${SIMBOT_VERSION} + + + love.forte.simbot.component + simbot-component-telegram-core-jvm + ${VERSION} + + +``` ## Examples diff --git a/simbot-component-telegram-stdlib/README.md b/simbot-component-telegram-stdlib/README.md index 68ffc64..089cc63 100644 --- a/simbot-component-telegram-stdlib/README.md +++ b/simbot-component-telegram-stdlib/README.md @@ -3,7 +3,36 @@ > [!caution] > WIP +## Setup +> [!note] +> Version (`VERSION` below) goes to the [releases](https://github.com/simple-robot/simbot-component-telegram/releases) reference. + +### Gradle + +`build.gradle.kts` + +```kotlin +plugins { + kotlin("...") version "..." +} + +dependencies { + implementation("love.forte.simbot.component:simbot-component-telegram-stdlib:$VERSION") +} +``` + +### Maven + +```xml + + + love.forte.simbot.component + simbot-component-telegram-stdlib-jvm + ${VERSION} + + +``` ## Examples diff --git a/simbot-component-telegram-type/README.md b/simbot-component-telegram-type/README.md index beb0289..d3ca28e 100644 --- a/simbot-component-telegram-type/README.md +++ b/simbot-component-telegram-type/README.md @@ -13,3 +13,34 @@ Support platforms: See also: - [Telegram available types](https://core.telegram.org/bots/api#available-types) + +## Setup + +> [!note] +> Version (`VERSION` below) goes to the [releases](https://github.com/simple-robot/simbot-component-telegram/releases) reference. + +### Gradle + +`build.gradle.kts` + +```kotlin +plugins { + kotlin("...") version "..." +} + +dependencies { + implementation("love.forte.simbot.component:simbot-component-telegram-type:$VERSION") +} +``` + +### Maven + +```xml + + + love.forte.simbot.component + simbot-component-telegram-type-jvm + ${VERSION} + + +``` diff --git a/simbot-component-telegram-type/README_CN.md b/simbot-component-telegram-type/README_CN.md index c3837f1..6a44d05 100644 --- a/simbot-component-telegram-type/README_CN.md +++ b/simbot-component-telegram-type/README_CN.md @@ -14,3 +14,34 @@ 更多参考: - [Telegram available types](https://core.telegram.org/bots/api#available-types) + +## 安装 + +> [!note] +> 版本 (即下文的 `VERSION`) 前往 [releases](https://github.com/simple-robot/simbot-component-telegram/releases) 参考. + +### Gradle + +`build.gradle.kts` + +```kotlin +plugins { + kotlin("...") version "..." +} + +dependencies { + implementation("love.forte.simbot.component:simbot-component-telegram-type:$VERSION") +} +``` + +### Maven + +```xml + + + love.forte.simbot.component + simbot-component-telegram-type-jvm + ${VERSION} + + +```