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

Typing generator #111

Merged
merged 18 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion api/ctjs.api
Original file line number Diff line number Diff line change
Expand Up @@ -2398,7 +2398,7 @@ public final class com/chattriggers/ctjs/api/world/World {
public static final fun hasPlayer (Ljava/lang/String;)Z
public static final fun isLoaded ()Z
public static final fun isRaining ()Z
public final fun toMC ()Lnet/minecraft/client/world/ClientWorld;
public static final fun toMC ()Lnet/minecraft/client/world/ClientWorld;
}

public final class com/chattriggers/ctjs/api/world/World$BorderWrapper {
Expand Down
8 changes: 7 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ plugins {
alias(libs.plugins.loom)
alias(libs.plugins.dokka)
alias(libs.plugins.validator)
alias(libs.plugins.ksp)
}

version = property("mod_version").toString()
Expand All @@ -43,6 +44,10 @@ dependencies {
modApi(libs.modmenu)
modRuntimeOnly(libs.devauth)
dokkaPlugin(libs.versioning)

implementation(kotlin("stdlib-jdk8"))
implementation(project(":typing-generator"))
ksp(project(":typing-generator"))
}

loom {
Expand All @@ -61,7 +66,8 @@ java {
}

apiValidation {
ignoredPackages.add("com.chattriggers.ctjs.internal")
ignoredProjects += "typing-generator"
ignoredPackages += "com.chattriggers.ctjs.internal"
mattco98 marked this conversation as resolved.
Show resolved Hide resolved
}

tasks {
Expand Down
10 changes: 8 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ yarn = "1.20.4+build.3"

loader = "0.15.3"
fabric-api = "0.92.1+1.20.4"
fabric-kotlin = "1.10.16+kotlin.1.9.21"
fabric-kotlin = "1.10.17+kotlin.1.9.22"

mapping-io = "0.5.1"
rhino = "96d0c07966"
Expand All @@ -23,9 +23,10 @@ devauth = "1.2.0"
dokka = "1.9.10"

# Plugin Versions
kotlin = "1.9.21"
kotlin = "1.9.22"
loom = "1.5-SNAPSHOT"
validator = "0.13.2"
ksp = "1.9.22-1.0.17"

[libraries]
minecraft = { module = "com.mojang:minecraft", version.ref = "minecraft" }
Expand All @@ -50,6 +51,9 @@ modmenu = { module = "com.terraformersmc:modmenu", version.ref = "modmenu" }
devauth = { module = "me.djtheredstoner:DevAuth-fabric", version.ref = "devauth" }
versioning = { module = "org.jetbrains.dokka:versioning-plugin", version.ref = "dokka" }

ksp = { module = "com.google.devtools.ksp:symbol-processing-api", version.ref = "ksp" }
gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }

[bundles]
fabric = ["fabric-loader", "fabric-api", "fabric-kotlin"]
included = ["mapping-io", "rhino", "jackson-core", "textarea", "serialization", "koffee"]
Expand All @@ -61,3 +65,5 @@ serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref
loom = { id = "fabric-loom", version.ref = "loom" }
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "validator" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }

1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ pluginManagement {
}

rootProject.name = "ctjs"
include(":typing-generator")
1 change: 0 additions & 1 deletion src/main/kotlin/com/chattriggers/ctjs/api/client/Player.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import com.chattriggers.ctjs.api.render.Renderer
import com.chattriggers.ctjs.api.world.PotionEffect
import com.chattriggers.ctjs.api.world.Scoreboard
import com.chattriggers.ctjs.api.world.World
import com.chattriggers.ctjs.api.world.block.Block
import com.chattriggers.ctjs.api.world.block.BlockFace
import com.chattriggers.ctjs.api.world.block.BlockPos
import gg.essential.universal.UMath
Expand Down
1 change: 1 addition & 0 deletions src/main/kotlin/com/chattriggers/ctjs/api/world/World.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import net.minecraft.world.LightType
import kotlin.math.roundToInt

object World {
@JvmStatic
fun toMC() = UMinecraft.getMinecraft().world

@JvmField
Expand Down
1 change: 0 additions & 1 deletion src/main/kotlin/com/chattriggers/ctjs/engine/Register.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.chattriggers.ctjs.engine

import com.chattriggers.ctjs.api.triggers.*
import com.chattriggers.ctjs.internal.listeners.ClientListener

@Suppress("unused", "MemberVisibilityCanBePrivate")
object Register {
Expand Down
17 changes: 17 additions & 0 deletions typing-generator/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
buildscript {
dependencies {
classpath(libs.gradle.plugin)
}
}

plugins {
alias(libs.plugins.kotlin)
}

repositories {
mavenCentral()
}

dependencies {
implementation(libs.ksp)
}
Loading
Loading