Skip to content
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

update: v4 - full rewrite #113

Draft
wants to merge 41 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
985a584
chore: Start rewrite
LichtHund Apr 12, 2024
265d554
feature: API design proposal
LichtHund Apr 14, 2024
fd01d5c
chore: Yeet old code
LichtHund Apr 14, 2024
2410ff4
feature: Improvements to the component API and starting to document
LichtHund Apr 21, 2024
e9890db
feature: New states!
LichtHund Apr 22, 2024
a4295b6
chore: Slightly rework components to be more extendable
LichtHund Apr 23, 2024
0e4a428
chore: Making components more extendable
LichtHund Apr 28, 2024
919db30
feature: Extendable click system
LichtHund May 3, 2024
a6abd38
feature: Implementing new click system
LichtHund May 4, 2024
46b58bc
chore: Bukkit -> Paper
LichtHund May 4, 2024
988574d
chore: Dependencies re-arrange
LichtHund May 4, 2024
7ad5f4d
feature: Bringing back the item builder
LichtHund May 5, 2024
6f1ee7b
chore: Click fixes and some comments
LichtHund May 6, 2024
91e812d
feature: Container types
LichtHund May 7, 2024
0986dfe
chore: Rework builder factory and gitignore
LichtHund May 13, 2024
118cf2f
chore: License
LichtHund May 13, 2024
e57ac8b
chore: Moving to Nova over built in states
LichtHund May 14, 2024
791f5a7
chore: Move state usage to Nova instead of built-in
LichtHund May 21, 2024
2e1db8d
feature: Filler, Kotlin extensions, and shortcut for stateless component
LichtHund Oct 16, 2024
e4ab63a
fix: Some compile errors
LichtHund Oct 16, 2024
d2911e5
feature: Reactive GUI title
LichtHund Oct 17, 2024
04281c9
chore: Code cleanup
LichtHund Oct 17, 2024
ade42a4
chore: Rename some files and update Nova to use "remember" over "state"
LichtHund Oct 18, 2024
3ee3ead
chore: Kotlin Container extensions
LichtHund Oct 18, 2024
a817b8d
feature: Basic click context with some information about the click
LichtHund Oct 18, 2024
dc706f0
chore: Change visibility of some dependencies
LichtHund Oct 18, 2024
6b2c10b
chore: Re-organized files and started adding examples
LichtHund Oct 19, 2024
442ceba
feature: Better Kotlin builder and some Kotlin examples
LichtHund Oct 19, 2024
f7754f5
chore: Actually use command with examples
LichtHund Oct 19, 2024
b7c82b4
chore: Remove unused function and fix typo
LichtHund Oct 19, 2024
50831f0
chore: Make examples a bit more documented
LichtHund Oct 19, 2024
3552abb
feature: Java examples and updating title example
LichtHund Oct 19, 2024
41efb42
chore: Update license
LichtHund Oct 20, 2024
3f9e5c7
fix: Static example wrong copy-paste
LichtHund Oct 22, 2024
e02f3b0
chore: Make publishing properties only error when publishing
LichtHund Oct 29, 2024
8b247db
feature: Add more utility methods to item builder
xMrAfonso Oct 29, 2024
0a10212
fix: Compile errors from previous PR
LichtHund Oct 29, 2024
f1e2e95
feature: Pagination and Scrolling
LichtHund Oct 30, 2024
19df9ee
chore: Add pagination and scrolling examples
LichtHund Nov 4, 2024
9a8c9b9
hmm
LichtHund Nov 29, 2024
f6c1ed4
feature: Port skull builder from v3
xMrAfonso Dec 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 113 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,125 @@
test-plugin/

gui/build/
# Created by https://www.toptal.com/developers/gitignore/api/gradle,intellij+all
# Edit at https://www.toptal.com/developers/gitignore?templates=gradle,intellij+all

test-plugin/build/
### Intellij+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

.idea/
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

.gradle/
# AWS User-specific
.idea/**/aws.xml

temp.java
# Generated files
.idea/**/contentModel.xml

temp.java.asc
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

gradle.properties
# Gradle
.idea/**/gradle.xml
.idea/**/libraries

test-plugin/
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

build/
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### Intellij+all Patch ###
# Ignores the whole .idea folder and all .iml files
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360

.idea/

# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023

*.iml
modules.xml
.idea/misc.xml
*.ipr

# Sonarlint plugin
.idea/sonarlint

### Gradle ###
.gradle
build/
run/

fabric-test/
# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Cache of project
.gradletasknamecache

# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties

### Gradle Patch ###
**/build/

# Eclipse Gradle plugin generated files
# Eclipse Core
.project
# JDT-specific (Eclipse Java Development Tools)
.classpath

# End of https://www.toptal.com/developers/gitignore/api/gradle,intellij+all

*.salive
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 TriumphTeam
Copyright (c) 2024 TriumphTeam

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
19 changes: 19 additions & 0 deletions build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import dev.triumphteam.root.root

plugins {
`kotlin-dsl`
id("dev.triumphteam.root.logic") version "0.0.14"
}

dependencies {
// Hack to allow version catalog inside convention plugins
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))

// Bundled plugins
implementation(libs.bundles.build)

// Bundled example plugins
implementation(libs.bundles.paper.examples)

root("0.0.14")
}
31 changes: 31 additions & 0 deletions build-logic/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import dev.triumphteam.root.localLibs
import dev.triumphteam.root.releasesRepo

rootProject.name = "build-logic"

dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
gradlePluginPortal()
mavenCentral()
releasesRepo()
}

versionCatalogs {

register("libs") {
from(files(localLibs))
}
}
}

pluginManagement {
repositories {
gradlePluginPortal()
maven("https://repo.triumphteam.dev/releases")
}
}

plugins {
id("dev.triumphteam.root.settings") version "0.0.14"
}
47 changes: 47 additions & 0 deletions build-logic/src/main/kotlin/gui.base.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import org.gradle.accessors.dm.LibrariesForLibs

// Hack which exposes `libs` to this convention plugin
val libs = the<LibrariesForLibs>()

plugins {
`java-library`
kotlin("jvm")
id("dev.triumphteam.root")
id("com.github.hierynomus.license")
}

repositories {
mavenCentral()
maven("https://triumphteam.dev/snapshots/")
}

dependencies {
compileOnly(libs.annotations)
}


java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
withSourcesJar()
withJavadocJar()
}

kotlin {
explicitApi()
}

license {
header = rootProject.file("LICENSE")
encoding = "UTF-8"
useDefaultMappings = true

include("**/*.kt")
include("**/*.java")
}

tasks {
withType<JavaCompile> {
options.encoding = "UTF-8"
options.compilerArgs.add("-parameters")
}
}
30 changes: 30 additions & 0 deletions build-logic/src/main/kotlin/gui.library.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import dev.triumphteam.root.configure.PublishConfigure

plugins {
`maven-publish`
signing
id("dev.triumphteam.root")
}

root {
configurePublishing {
configure {

from(components["java"])

snapshotsRepo(PublishConfigure.TRIUMPH_SNAPSHOTS) {
username = providers.gradleProperty("triumph.repo.user").orNull ?: ""
password = providers.gradleProperty("triumph.repo.token").orNull ?: ""
}

releasesRepo(PublishConfigure.CENTRAL) {
username = providers.gradleProperty("central.repo.user").orNull ?: ""
password = providers.gradleProperty("central.repo.password").orNull ?: ""
}

/*signing {
sign(publishing.publications["maven"])
}*/
}
}
}
23 changes: 23 additions & 0 deletions build-logic/src/main/kotlin/gui.paper-example.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import org.gradle.accessors.dm.LibrariesForLibs

// Hack which exposes `libs` to this convention plugin
val libs = the<LibrariesForLibs>()

plugins {
`java-library`
id("xyz.jpenilla.run-paper")
id("xyz.jpenilla.resource-factory-bukkit-convention")
id("com.gradleup.shadow")
}

repositories {
mavenCentral()
}

dependencies {
compileOnly(libs.paper)
}

java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}
4 changes: 4 additions & 0 deletions build-logic/src/main/kotlin/gui.parent.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
plugins {
`java-library`
kotlin("jvm")
}
48 changes: 1 addition & 47 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,49 +1,3 @@
plugins {
id("java-library")
id("com.github.hierynomus.license") version "0.16.1"
}

allprojects {
repositories {
mavenLocal()
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
}
}

subprojects {

apply {
plugin("java-library")
plugin("com.github.hierynomus.license")
}

group = "dev.triumphteam"
version = "3.1.7"

dependencies {
compileOnly("org.jetbrains:annotations:21.0.1")
compileOnly("io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT")

val adventureVersion = "4.14.0"
api("net.kyori:adventure-api:$adventureVersion")
api("net.kyori:adventure-text-serializer-legacy:$adventureVersion")
api("net.kyori:adventure-text-serializer-gson:$adventureVersion")
}

license {
header = rootProject.file("LICENSE")
encoding = "UTF-8"
mapping("java", "JAVADOC_STYLE")
include("**/*.java")
}

tasks {
withType<JavaCompile> {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
options.encoding = "UTF-8"
}
}

id("gui.parent")
}
Loading