Skip to content
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
240 changes: 226 additions & 14 deletions Generator/src/main/kotlin/Main.kt

Large diffs are not rendered by default.

86 changes: 12 additions & 74 deletions KotlinFire/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,65 +1,17 @@
import com.vanniktech.maven.publish.JavadocJar
import com.vanniktech.maven.publish.KotlinJvm
import com.vanniktech.maven.publish.SonatypeHost

/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Kotlin library project to get you started.
* For more details on building Java & JVM projects, please refer to https://docs.gradle.org/8.7/userguide/building_java_projects.html in the Gradle documentation.
*/
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
// Apply the org.jetbrains.kotlin.jvm Plugin to add support for Kotlin.
kotlin("jvm") apply true
kotlin("plugin.serialization") apply true

id("com.vanniktech.maven.publish") version "0.31.0-rc2"
id("com.vanniktech.maven.publish") version "0.34.0"
id("org.jetbrains.dokka") version "2.0.0"
}

version = "1.6.4"
version = "1.7.0-SNAPSHOT"
group = "io.github.flyingpig525"

//publishing {
// publications {
// create<MavenPublication>("gpr") {
// from(components["java"])
// this.artifactId = "KotlinFire"
//
// pom {
// name = "KotlinFire"
// description =
// "KotlinFire is a Kotlin library used to manipulate code templates from the Minecraft server DiamondFire."
// url = "https://github.com/FlyingPig525/KotlinFire"
// licenses {
// license {
// name = "The Apache License, Version 2.0"
// url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
// }
// }
// developers {
// developer {
// id = "flyingpig525"
// name = "FlyingPig525"
// }
// }
// scm {
// connection = "scm:git:git://github.com/FlyingPig525/KotlinFire.git"
// developerConnection = "scm:git:ssh://github.com/FlyingPig525/KotlinFire.git"
// url = "https://github.com/FlyingPig525/KotlinFire"
// }
// }
// }
// }
//}

mavenPublishing {
// configure(KotlinJvm(
// javadocJar = JavadocJar.Dokka( ),
// sourcesJar = false
// ))

coordinates(
"io.github.flyingpig525",
"kotlinfire",
Expand Down Expand Up @@ -93,42 +45,28 @@ mavenPublishing {
}

signAllPublications()
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
publishToMavenCentral(automaticRelease = true)
}
//signing {
// useGpgCmd()
// sign(publishing.publications)
// this.ext {
//
// }
//}


repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
}

dependencies {
testImplementation(kotlin("test"))

val ktor_version = "3.1.2"
val ktor_version = "3.5.0"
implementation("io.ktor:ktor-client-websockets:$ktor_version")
implementation("io.ktor:ktor-client-java:$ktor_version")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.8.1")

// testRuntimeOnly("org.junit.platform:junit-platform-launcher")
// implementation(kotlin("stdlib-jdk8"))
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.11.0")
implementation(kotlin("reflect"))
}

// Apply a specific Java toolchain to ease working on different environments.
//java {
// toolchain {
// languageVersion = JavaLanguageVersion.of(17)
// }
// withSourcesJar()
// withJavadocJar()
//}
kotlin {
jvmToolchain(17)
jvmToolchain(21)
}
val compileKotlin: KotlinCompile by tasks
compileKotlin.compilerOptions {
freeCompilerArgs.set(listOf("-Xcontext-parameters"))
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package io.github.flyingpig525.base
import io.github.flyingpig525.base.block.EntityEvent
import io.github.flyingpig525.base.block.EventBlock
import io.github.flyingpig525.base.block.PlayerEvent
import io.github.flyingpig525.base.item.Item

/**
* A DiamondFire event.
Expand All @@ -12,23 +11,29 @@ import io.github.flyingpig525.base.item.Item
*/
class EventTemplate private constructor(
event: EventBlock,
a: Template.() -> Unit
code: Template.() -> Unit
) : Template(
Type.EVENT, "", a = a
Type.EVENT, "", code = code
) {

constructor(event: PlayerEvent, a: Template.() -> Unit) : this(
/**
* Creates a player event codeline
*/
constructor(event: PlayerEvent, code: Template.() -> Unit) : this(
EventBlock(
event.type,
event.event
), a
), code
)

constructor(event: EntityEvent, a: Template.() -> Unit) : this(
/**
* Creates an entity event codeline
*/
constructor(event: EntityEvent, code: Template.() -> Unit) : this(
EventBlock(
event.type,
event.event
), a
), code
)

init {
Expand Down

This file was deleted.

Loading
Loading