Skip to content

Commit

Permalink
Merge pull request #113 from simple-robot/use-K2
Browse files Browse the repository at this point in the history
尝试启用K2编译器
  • Loading branch information
ForteScarlet authored Jan 26, 2024
2 parents d43c2dc + 7b6cdcb commit 2ff331d
Show file tree
Hide file tree
Showing 16 changed files with 312 additions and 292 deletions.
4 changes: 2 additions & 2 deletions Writerside/d.tree
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

</toc-element>
<toc-element topic="bot-config.md"/>
<toc-element toc-title="API">
<toc-element topic="api.md"/>
<toc-element toc-title="API与部分能力">
<toc-element topic="api-list.md"/>
<toc-element topic="api_ark.md"/>
<toc-element topic="api_embed.md"/>
<toc-element topic="api_forum.md"/>
Expand Down
264 changes: 264 additions & 0 deletions Writerside/topics/api-list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,264 @@
# API列表

此处会列举 `API 模块` 中、`love.forte.simbot.qguild.api` 包下定义的所有 `QQGuildApi` 实现。

> 对于一个具体的API的详细说明,我们建议你前往 [API 文档](https://docs.simbot.forte.love/) 或源码注释查阅,
> 因为那是最贴合真实情况且最全面的。
<deflist>
<def title="CreateAnnouncesApi">

> `love.forte.simbot.qguild.api.announces.CreateAnnouncesApi`
</def>
<def title="DeleteAnnouncesApi">

> `love.forte.simbot.qguild.api.announces.DeleteAnnouncesApi`
</def>
<def title="DemandApiPermissionApi">

> `love.forte.simbot.qguild.api.apipermission.DemandApiPermissionApi`
</def>
<def title="GetApiPermissionListApi">

> `love.forte.simbot.qguild.api.apipermission.GetApiPermissionListApi`
</def>
<def title="CreateChannelApi">

> `love.forte.simbot.qguild.api.channel.CreateChannelApi`
</def>
<def title="DeleteChannelApi">

> `love.forte.simbot.qguild.api.channel.DeleteChannelApi`
</def>
<def title="GetChannelApi">

> `love.forte.simbot.qguild.api.channel.GetChannelApi`
</def>
<def title="GetChannelOnlineNumsApi">

> `love.forte.simbot.qguild.api.channel.GetChannelOnlineNumsApi`
</def>
<def title="GetGuildChannelListApi">

> `love.forte.simbot.qguild.api.channel.GetGuildChannelListApi`
</def>
<def title="ModifyChannelApi">

> `love.forte.simbot.qguild.api.channel.ModifyChannelApi`
</def>
<def title="GetChannelMemberPermissionsApi">

> `love.forte.simbot.qguild.api.channel.permissions.GetChannelMemberPermissionsApi`
</def>
<def title="GetChannelRolePermissionsApi">

> `love.forte.simbot.qguild.api.channel.permissions.GetChannelRolePermissionsApi`
</def>
<def title="ModifyChannelMemberPermissionsApi">

> `love.forte.simbot.qguild.api.channel.permissions.ModifyChannelMemberPermissionsApi`
</def>
<def title="ModifyChannelRolePermissionsApi">

> `love.forte.simbot.qguild.api.channel.permissions.ModifyChannelRolePermissionsApi`
</def>
<def title="AddPinsMessageApi">

> `love.forte.simbot.qguild.api.channel.pins.AddPinsMessageApi`
</def>
<def title="DeletePinsMessageApi">

> `love.forte.simbot.qguild.api.channel.pins.DeletePinsMessageApi`
</def>
<def title="GetPinsMessageApi">

> `love.forte.simbot.qguild.api.channel.pins.GetPinsMessageApi`
</def>
<def title="CreateScheduleApi">

> `love.forte.simbot.qguild.api.channel.schedules.CreateScheduleApi`
</def>
<def title="DeleteScheduleApi">

> `love.forte.simbot.qguild.api.channel.schedules.DeleteScheduleApi`
</def>
<def title="GetScheduleApi">

> `love.forte.simbot.qguild.api.channel.schedules.GetScheduleApi`
</def>
<def title="GetScheduleListApi">

> `love.forte.simbot.qguild.api.channel.schedules.GetScheduleListApi`
</def>
<def title="ModifyScheduleApi">

> `love.forte.simbot.qguild.api.channel.schedules.ModifyScheduleApi`
</def>
<def title="DeleteThreadApi">

> `love.forte.simbot.qguild.api.forum.DeleteThreadApi`
</def>
<def title="GetThreadApi">

> `love.forte.simbot.qguild.api.forum.GetThreadApi`
</def>
<def title="GetThreadListApi">

> `love.forte.simbot.qguild.api.forum.GetThreadListApi`
</def>
<def title="PublishThreadApi">

> `love.forte.simbot.qguild.api.forum.PublishThreadApi`
</def>
<def title="Normal">

> `love.forte.simbot.qguild.api.GatewayApis$Normal`
</def>
<def title="Shared">

> `love.forte.simbot.qguild.api.GatewayApis$Shared`
</def>
<def title="GetGuildApi">

> `love.forte.simbot.qguild.api.guild.GetGuildApi`
</def>
<def title="MuteAllApi">

> `love.forte.simbot.qguild.api.guild.mute.MuteAllApi`
</def>
<def title="MuteMemberApi">

> `love.forte.simbot.qguild.api.guild.mute.MuteMemberApi`
</def>
<def title="MuteMultiMemberApi">

> `love.forte.simbot.qguild.api.guild.mute.MuteMultiMemberApi`
</def>
<def title="DeleteMemberApi">

> `love.forte.simbot.qguild.api.member.DeleteMemberApi`
</def>
<def title="GetGuildMemberListApi">

> `love.forte.simbot.qguild.api.member.GetGuildMemberListApi`
</def>
<def title="GetGuildRoleMemberListApi">

> `love.forte.simbot.qguild.api.member.GetGuildRoleMemberListApi`
</def>
<def title="GetMemberApi">

> `love.forte.simbot.qguild.api.member.GetMemberApi`
</def>
<def title="DeleteMessageApi">

> `love.forte.simbot.qguild.api.message.DeleteMessageApi`
</def>
<def title="CreateDmsApi">

> `love.forte.simbot.qguild.api.message.direct.CreateDmsApi`
</def>
<def title="DeleteDmsApi">

> `love.forte.simbot.qguild.api.message.direct.DeleteDmsApi`
</def>
<def title="DmsSendApi">

> `love.forte.simbot.qguild.api.message.direct.DmsSendApi`
</def>
<def title="GetMessageApi">

> `love.forte.simbot.qguild.api.message.GetMessageApi`
</def>
<def title="MessageSendApi">

> `love.forte.simbot.qguild.api.message.MessageSendApi`
</def>
<def title="GetMessageSettingApi">

> `love.forte.simbot.qguild.api.message.setting.GetMessageSettingApi`
</def>
<def title="AddMemberRoleApi">

> `love.forte.simbot.qguild.api.role.AddMemberRoleApi`
</def>
<def title="CreateGuildRoleApi">

> `love.forte.simbot.qguild.api.role.CreateGuildRoleApi`
</def>
<def title="DeleteGuildRoleApi">

> `love.forte.simbot.qguild.api.role.DeleteGuildRoleApi`
</def>
<def title="GetGuildRoleListApi">

> `love.forte.simbot.qguild.api.role.GetGuildRoleListApi`
</def>
<def title="ModifyGuildRoleApi">

> `love.forte.simbot.qguild.api.role.ModifyGuildRoleApi`
</def>
<def title="RemoveMemberRoleApi">

> `love.forte.simbot.qguild.api.role.RemoveMemberRoleApi`
</def>
<def title="GetBotGuildListApi">

> `love.forte.simbot.qguild.api.user.GetBotGuildListApi`
</def>
<def title="GetBotInfoApi">

> `love.forte.simbot.qguild.api.user.GetBotInfoApi`
</def>
</deflist>
9 changes: 0 additions & 9 deletions Writerside/topics/api.md

This file was deleted.

8 changes: 6 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ plugins {
repositories {
mavenCentral()
gradlePluginPortal()
mavenLocal()
}

val kotlinVersion: String = libs.versions.kotlin.get()
Expand All @@ -44,5 +45,8 @@ dependencies {
implementation(libs.bundles.gradle.common)
}



//tasks.withType<KotlinCompile> {
// kotlinOptions {
// languageVersion = "2.0"
// }
//}
29 changes: 29 additions & 0 deletions buildSrc/src/main/kotlin/K2Config.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright (c) 2024. ForteScarlet.
*
* This file is part of simbot-component-qq-guild.
*
* simbot-component-qq-guild is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
*
* simbot-component-qq-guild is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along with simbot-component-qq-guild.
* If not, see <https://www.gnu.org/licenses/>.
*/

import org.gradle.api.Project
import org.gradle.kotlin.dsl.withType


fun Project.useK2(languageVersion: String = "2.0") {
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
// useK2
this.languageVersion = languageVersion
}
}
}
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/P.kt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ object P {
override val homepage: String get() = HOMEPAGE


private val baseVersion = v(4, 0, 0) - v("dev6")
private val baseVersion = v(4, 0, 0) - v("dev7")

val snapshotVersion = baseVersion - Version.SNAPSHOT
override val version = if (isSnapshot()) snapshotVersion else baseVersion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,5 @@ suspendTransform {
// SuspendTransforms.suspendTransTransformerForJsPromise,
// )
}


46 changes: 0 additions & 46 deletions builder-generator/build.gradle.kts

This file was deleted.

Loading

0 comments on commit 2ff331d

Please sign in to comment.