-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate kord enums with KSP #686
Merged
Merged
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
f30f7c3
Add KSP processor for enum generation
lukellmann c110a92
Add options to deprecate `values` property
lukellmann 35dd217
Generate MessageStickerType
lukellmann 1c768a0
Generate ChannelType
lukellmann eb2be55
Suppress errors for `HIDDEN` entries
lukellmann c9e845e
Merge branch '0.8.x' into refactor/enum-generation
lukellmann 4ef0576
Use annotation constructors, small other changes
lukellmann 4f97998
Merge branch '0.8.x' into refactor/enum-generation
lukellmann 56360df
Fix errors after merge
lukellmann f8b5155
Include generated symbols in dokka output
lukellmann af13bbb
Check ksp output into vcs
lukellmann f6f9bb2
Rename `kordJvmOptions()` to `applyKordKotlinOptions()`
lukellmann 22c212c
Hardcode deprecation level for values property
lukellmann 3d5b2d8
Wrapper class for annotation arguments
lukellmann 6e86162
Rollback renames
lukellmann 2271de2
Merge branch '0.8.x' into refactor/enum-generation
lukellmann e1e741b
Generate `AuditLogEvent`
lukellmann da27677
Generate `AutoModerationRuleTriggerType`, `AutoModerationRuleKeywordP…
lukellmann 5dfba4f
Generate `OverwriteType` and `VideoQualityMode`
lukellmann c39aaff
Generate `ComponentType`, `ButtonStyle` and `TextInputStyle`
lukellmann b2ec643
Generate `DiscordConnectionVisibility`
lukellmann 780113e
Generate `GuildFeature`
lukellmann df417ed
Generate `DefaultMessageNotificationLevel`, `ExplicitContentFilter`, …
lukellmann ffe5efd
Generate `GuildScheduledEventPrivacyLevel`, `ScheduledEntityType` and…
lukellmann 914f06f
Generate `IntegrationExpireBehavior`
lukellmann 10ffc50
Generate `InviteTargetType`
lukellmann 77d9ae2
Add missing `GuildFeature.Commerce`
lukellmann c961a98
Generate `MessageType`
lukellmann 2a01023
Generate `MessageActivityType` and `AllowedMentionType`
lukellmann a5db3bd
Generate `StageInstancePrivacyLevel`
lukellmann aa49f9a
Generate `UserPremium`
lukellmann 4a6e5d4
Generate `WebhookType`
lukellmann 5c99c0c
Generate `ApplicationCommandType`, `ApplicationCommandOptionType`, `I…
lukellmann 525dc11
Fix test
lukellmann a21d5c5
Generate `PresenceStatus` and `TeamMembershipState`
lukellmann a89afc2
Update dokka config for ksp
lukellmann 68612cc
Gradle config formatting
lukellmann b768ef7
Merge branch '0.8.x' into refactor/enum-generation
lukellmann e360522
Binary compatibility for `DiscordGuildApplicationCommandPermission.Type`
lukellmann b06be40
Add `@DslMarker` for scope control in KotlinPoet DSL
lukellmann c15e526
Remove comments
lukellmann 4dd5635
Binary compatibility for old public serializers
lukellmann 4ea2a61
New order for KotlinPoet DSL
lukellmann a60166d
Add `toString` to all kord enums
lukellmann 735c464
Put `KordEnumProcessorProvider` and `KordEnumProcessor` into same file
lukellmann bb7bf54
Suppress "SpellCheckingInspection" and "GrazieInspection" in generate…
lukellmann 100e9be
Add KDoc for `entries` and `value`
lukellmann 1d7fb28
Generate `EmbedType`
lukellmann e418baf
Merge branch '0.8.x' into refactor/enum-generation
lukellmann 56804bd
Update dokka config
lukellmann 4750273
Remove double slash in dokka source links
lukellmann 6eb6f0e
Merge branch '0.8.x' into refactor/enum-generation
lukellmann 48fe706
`SOURCE` retention for `@KotlinPoetDsl`
lukellmann File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
.gradle/ | ||
.idea/ | ||
build/ | ||
out/ | ||
dokka/ | ||
|
||
**/build/* | ||
!**/build/generated/ | ||
# re-exclude BuildConfigGenerated.kt | ||
common/build/generated/source/buildConfig/main/main/dev/kord/common/BuildConfigGenerated.kt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
|
||
plugins { | ||
kotlin("jvm") | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
tasks { | ||
withType<JavaCompile> { | ||
sourceCompatibility = Jvm.targetString | ||
targetCompatibility = Jvm.targetString | ||
} | ||
|
||
withType<KotlinCompile> { | ||
kotlinOptions { | ||
applyKordKotlinOptions() | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now I included the generated files by removing them from the
.gitignore
. I'm not sure if this is the way we should do it, @DRSchlaubi had some other ideas before, what do you say?