13 Commits

Author SHA1 Message Date
d160fa7ee5 build(deps): bump org.jetbrains.dokka:javadoc-plugin (#187)
Bumps [org.jetbrains.dokka:javadoc-plugin](https://github.com/Kotlin/dokka) from 1.9.10 to 2.0.0.
- [Release notes](https://github.com/Kotlin/dokka/releases)
- [Commits](https://github.com/Kotlin/dokka/compare/v1.9.10...v2.0.0)

---
updated-dependencies:
- dependency-name: org.jetbrains.dokka:javadoc-plugin
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-29 17:34:24 +08:00
b053388f82 build(deps): bump com.google.code.gson:gson from 2.10.1 to 2.11.0 (#182)
Bumps [com.google.code.gson:gson](https://github.com/google/gson) from 2.10.1 to 2.11.0.
- [Release notes](https://github.com/google/gson/releases)
- [Changelog](https://github.com/google/gson/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google/gson/compare/gson-parent-2.10.1...gson-parent-2.11.0)

---
updated-dependencies:
- dependency-name: com.google.code.gson:gson
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-29 15:58:06 +08:00
818cb21df7 release: 发布 0.8.0-1 版本.
这是 0.8.0 版本的重新发布版本, 由于 0.8.0 版本在构建并发布到 Maven 仓库中出现问题,
为确保本项目的“可重现构建”承诺能正常实施, 因此决定发布 0.8.0-1 版本.
该版本与 0.8.0 版本除了补充缺失的 Javadoc 外并无其他差别, 最终用户依然可以继续使用 0.8.0 版本.
2024-12-11 23:12:02 +08:00
c681ebc4c1 build: 不再使用 kuku-repo 作为发布仓库.
Some checks failed
Binary compatibility verification (for API) / apiCompatibilityCheck (push) Has been cancelled
Build and test project / build (push) Has been cancelled
Build development version container image / build (push) Has been cancelled
2024-12-11 09:47:22 +08:00
44b7b5122f docs(extension): 补充部分缺失的 Javadoc 文档. 2024-12-11 09:46:15 +08:00
bf4adc8437 release: 发布 0.8.0 版本. 2024-12-11 09:34:32 +08:00
47d34b0fd8 build(deps): bump docker/build-push-action from 5 to 6 (#163)
Some checks are pending
Binary compatibility verification (for API) / apiCompatibilityCheck (push) Waiting to run
Build and test project / build (push) Waiting to run
Build development version container image / build (push) Waiting to run
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-11 00:56:54 +08:00
14098d285c build(deps): bump io.mockk:mockk from 1.13.9 to 1.13.13 (#176)
Bumps [io.mockk:mockk](https://github.com/mockk/mockk) from 1.13.9 to 1.13.13.
- [Release notes](https://github.com/mockk/mockk/releases)
- [Commits](https://github.com/mockk/mockk/compare/1.13.9...1.13.13)

---
updated-dependencies:
- dependency-name: io.mockk:mockk
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-11 00:54:30 +08:00
ad359935d6 build(deps): bump org.jetbrains.kotlinx:kotlinx-coroutines-core (#174)
Bumps [org.jetbrains.kotlinx:kotlinx-coroutines-core](https://github.com/Kotlin/kotlinx.coroutines) from 1.7.3 to 1.9.0.
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.7.3...1.9.0)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-11 00:51:46 +08:00
3e1bf4991d build(deps): 将 Kotlin 更新至 2.1.0 版本. 2024-12-11 00:47:57 +08:00
bd7f556c31 build(gradle): 将 Gradle 更新至 8.11.1 版本. 2024-12-11 00:14:18 +08:00
9c069adc4b build(deps): bump ch.qos.logback:logback-classic from 1.4.14 to 1.5.12 (#179)
Bumps [ch.qos.logback:logback-classic](https://github.com/qos-ch/logback) from 1.4.14 to 1.5.12.
- [Commits](https://github.com/qos-ch/logback/compare/v_1.4.14...v_1.5.12)

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-classic
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-10 23:54:58 +08:00
96a06c48ee build(deps): bump org.jetbrains.kotlinx.kover from 0.7.5 to 0.8.3 (#167)
Bumps [org.jetbrains.kotlinx.kover](https://github.com/Kotlin/kotlinx-kover) from 0.7.5 to 0.8.3.
- [Release notes](https://github.com/Kotlin/kotlinx-kover/releases)
- [Changelog](https://github.com/Kotlin/kotlinx-kover/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Kotlin/kotlinx-kover/compare/v0.7.5...v0.8.3)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx.kover
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-10 23:50:00 +08:00
11 changed files with 37 additions and 45 deletions

View File

@ -36,7 +36,7 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push container image - name: Build and push container image
uses: docker/build-push-action@v5 uses: docker/build-push-action@v6
with: with:
context: . context: .
push: true push: true

View File

@ -36,7 +36,7 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push container image - name: Build and push container image
uses: docker/build-push-action@v5 uses: docker/build-push-action@v6
with: with:
context: . context: .
push: true push: true

View File

@ -1,6 +1,6 @@
plugins { plugins {
kotlin("jvm") version "1.9.23" apply false kotlin("jvm") version "2.1.0" apply false
id("org.jetbrains.kotlinx.kover") version "0.7.5" apply false id("org.jetbrains.kotlinx.kover") version "0.8.3" apply false
id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.16.3" apply false id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.16.3" apply false
} }
@ -13,5 +13,5 @@ allprojects {
} }
group = "net.lamgc" group = "net.lamgc"
version = "0.7.0" version = "0.8.0-1"
} }

Binary file not shown.

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

10
gradlew vendored
View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# #
# Copyright ? 2015-2021 the original authors. # Copyright © 2015-2021 the original authors.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
@ -32,10 +32,10 @@
# Busybox and similar reduced shells will NOT work, because this script # Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features: # requires all of these POSIX shell features:
# * functions; # * functions;
# * expansions ?$var?, ?${var}?, ?${var:-default}?, ?${var+SET}?, # * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# ?${var#prefix}?, ?${var%suffix}?, and ?$( cmd )?; # «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially ?case?; # * compound commands having a testable exit status, especially «case»;
# * various built-in commands including ?command?, ?set?, and ?ulimit?. # * various built-in commands including «command», «set», and «ulimit».
# #
# Important for patching: # Important for patching:
# #

View File

@ -1,3 +1,4 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins { plugins {
@ -12,7 +13,7 @@ dependencies {
implementation("org.slf4j:slf4j-api:2.0.11") implementation("org.slf4j:slf4j-api:2.0.11")
implementation("io.github.microutils:kotlin-logging:3.0.5") implementation("io.github.microutils:kotlin-logging:3.0.5")
implementation("ch.qos.logback:logback-classic:1.4.14") implementation("ch.qos.logback:logback-classic:1.5.12")
val aetherVersion = "1.1.0" val aetherVersion = "1.1.0"
implementation("org.eclipse.aether:aether-api:$aetherVersion") implementation("org.eclipse.aether:aether-api:$aetherVersion")
@ -24,9 +25,9 @@ dependencies {
implementation("org.apache.maven:maven-aether-provider:3.3.9") implementation("org.apache.maven:maven-aether-provider:3.3.9")
implementation("org.codehaus.plexus:plexus-utils:3.5.1") implementation("org.codehaus.plexus:plexus-utils:3.5.1")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.9.0")
implementation("org.jetbrains.kotlin:kotlin-reflect:1.9.23") implementation("org.jetbrains.kotlin:kotlin-reflect:2.1.0")
implementation("com.google.code.gson:gson:2.10.1") implementation("com.google.code.gson:gson:2.11.0")
implementation("org.jdom:jdom2:2.0.6.1") implementation("org.jdom:jdom2:2.0.6.1")
@ -38,17 +39,19 @@ dependencies {
implementation("io.prometheus:simpleclient_httpserver:0.16.0") implementation("io.prometheus:simpleclient_httpserver:0.16.0")
testImplementation(kotlin("test")) testImplementation(kotlin("test"))
testImplementation("io.mockk:mockk:1.13.9") testImplementation("io.mockk:mockk:1.13.13")
testImplementation("com.github.stefanbirkner:system-lambda:1.2.1") testImplementation("com.github.stefanbirkner:system-lambda:1.2.1")
} }
tasks.test { tasks.test {
useJUnitPlatform() useJUnitPlatform()
jvmArgs("--add-opens", "java.base/java.util=ALL-UNNAMED", "--add-opens", "java.base/java.lang=ALL-UNNAMED")
} }
tasks.withType<KotlinCompile> { tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "17" compilerOptions {
jvmTarget = JvmTarget.JVM_17
}
} }
application { application {

View File

@ -51,17 +51,6 @@ publishing {
password = project.properties["repo.credentials.self-git.password"].toString() password = project.properties["repo.credentials.self-git.password"].toString()
} }
} }
val kukuRepoUrl = if (project.version.toString().endsWith("-SNAPSHOT", ignoreCase = true)) {
"https://nexus.kuku.me/repository/maven-snapshots/"
} else {
"https://nexus.kuku.me/repository/maven-releases/"
}
maven(kukuRepoUrl) {
credentials {
username = project.properties["repo.credentials.kuku-repo.username"].toString()
password = project.properties["repo.credentials.kuku-repo.password"].toString()
}
}
} }
publications { publications {

View File

@ -13,6 +13,12 @@ public class BotExtensionCreateOptions {
private final long botAccountId; private final long botAccountId;
private final ProxyConfig proxy; private final ProxyConfig proxy;
/**
* 构造新的 BotExtensionCreateOptions.
*
* @param botAccountId 创建扩展的 Bot 账户 Id.
* @param proxy Bot 所使用的代理配置.
*/
public BotExtensionCreateOptions(long botAccountId, ProxyConfig proxy) { public BotExtensionCreateOptions(long botAccountId, ProxyConfig proxy) {
this.botAccountId = botAccountId; this.botAccountId = botAccountId;
this.proxy = proxy; this.proxy = proxy;

View File

@ -4,6 +4,9 @@ import org.telegram.telegrambots.abilitybots.api.bot.BaseAbilityBot;
import java.util.Map; import java.util.Map;
/**
* 一些开发扩展中可以用到的工具类.
*/
public final class AbilityBots { public final class AbilityBots {
private AbilityBots() { private AbilityBots() {

View File

@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins { plugins {
kotlin("jvm") kotlin("jvm")
id("org.jetbrains.kotlinx.kover") id("org.jetbrains.kotlinx.kover")
@ -14,19 +16,19 @@ dependencies {
implementation("org.telegram:telegrambots-meta:8.0.0") implementation("org.telegram:telegrambots-meta:8.0.0")
api("com.google.code.gson:gson:2.10.1") api("com.google.code.gson:gson:2.11.0")
testImplementation(kotlin("test")) testImplementation(kotlin("test"))
testImplementation("io.mockk:mockk:1.13.9") testImplementation("io.mockk:mockk:1.13.13")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.1") testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.1")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.1") testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.1")
dokkaHtmlPlugin("org.jetbrains.dokka:javadoc-plugin:1.9.10") dokkaHtmlPlugin("org.jetbrains.dokka:javadoc-plugin:2.0.0")
} }
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach { tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions { compilerOptions {
jvmTarget = "17" jvmTarget = JvmTarget.JVM_17
} }
} }
@ -58,17 +60,6 @@ publishing {
password = project.properties["repo.credentials.self-git.password"].toString() password = project.properties["repo.credentials.self-git.password"].toString()
} }
} }
val kukuRepoUrl = if (project.version.toString().endsWith("-SNAPSHOT", ignoreCase = true)) {
"https://nexus.kuku.me/repository/maven-snapshots/"
} else {
"https://nexus.kuku.me/repository/maven-releases/"
}
maven(kukuRepoUrl) {
credentials {
username = project.properties["repo.credentials.kuku-repo.username"].toString()
password = project.properties["repo.credentials.kuku-repo.password"].toString()
}
}
} }
publications { publications {