Skip to content

Commit

Permalink
更新README
Browse files Browse the repository at this point in the history
  • Loading branch information
ForteScarlet committed Apr 9, 2024
1 parent c595586 commit 118c758
Show file tree
Hide file tree
Showing 7 changed files with 242 additions and 1 deletion.
9 changes: 8 additions & 1 deletion buildSrc/src/main/kotlin/R.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,22 @@
* If not, see <https://www.gnu.org/licenses/>.
*/

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.")
}
Expand Down
31 changes: 31 additions & 0 deletions simbot-component-telegram-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<dependencies>
<dependency>
<groupId>love.forte.simbot.component</groupId>
<artifactId>simbot-component-telegram-api-jvm</artifactId>
<version>${VERSION}</version>
</dependency>
</dependencies>
```

## Supports

See [supports](supports.md).
Expand Down
31 changes: 31 additions & 0 deletions simbot-component-telegram-api/README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<dependencies>
<dependency>
<groupId>love.forte.simbot.component</groupId>
<artifactId>simbot-component-telegram-type-jvm</artifactId>
<version>${VERSION}</version>
</dependency>
</dependencies>
```

## 支持列表

参考 [支持列表](supports.md)
Expand Down
81 changes: 81 additions & 0 deletions simbot-component-telegram-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<dependencies>
<dependency>
<groupId>love.forte.simbot</groupId>
<artifactId>simbot-core-jvm</artifactId>
<version>${SIMBOT_VERSION}</version>
</dependency>
<dependency>
<groupId>love.forte.simbot.component</groupId>
<artifactId>simbot-component-telegram-core-jvm</artifactId>
<version>${VERSION}</version>
</dependency>
</dependencies>
```

**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
<dependencies>
<dependency>
<groupId>love.forte.simbot</groupId>
<artifactId>simbot-core-spring-boot-starter</artifactId>
<version>${SIMBOT_VERSION}</version>
</dependency>
<dependency>
<groupId>love.forte.simbot.component</groupId>
<artifactId>simbot-component-telegram-core-jvm</artifactId>
<version>${VERSION}</version>
</dependency>
</dependencies>
```

## Examples

Expand Down
29 changes: 29 additions & 0 deletions simbot-component-telegram-stdlib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<dependencies>
<dependency>
<groupId>love.forte.simbot.component</groupId>
<artifactId>simbot-component-telegram-stdlib-jvm</artifactId>
<version>${VERSION}</version>
</dependency>
</dependencies>
```

## Examples

Expand Down
31 changes: 31 additions & 0 deletions simbot-component-telegram-type/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<dependencies>
<dependency>
<groupId>love.forte.simbot.component</groupId>
<artifactId>simbot-component-telegram-type-jvm</artifactId>
<version>${VERSION}</version>
</dependency>
</dependencies>
```
31 changes: 31 additions & 0 deletions simbot-component-telegram-type/README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<dependencies>
<dependency>
<groupId>love.forte.simbot.component</groupId>
<artifactId>simbot-component-telegram-type-jvm</artifactId>
<version>${VERSION}</version>
</dependency>
</dependencies>
```

0 comments on commit 118c758

Please sign in to comment.