Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
1.19 (#3)
Browse files Browse the repository at this point in the history
* update

* Check private type arguments, add versions.toml

Co-authored-by: 0ffz <[email protected]>
  • Loading branch information
Boy0000 and 0ffz authored Jun 21, 2022
1 parent c817f69 commit d8e4975
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 33 deletions.
4 changes: 3 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ plugins {

repositories {
mavenCentral()
mavenLocal()
google()
}

Expand All @@ -19,14 +20,15 @@ allprojects {
version = rootProject.version

repositories {
mavenLocal()
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
maven("https://repo.dmulloy2.net/nexus/repository/public/")//ProtocolLib
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
}

dependencies {
compileOnly(kotlin("stdlib-jdk8"))
compileOnly("com.comphenix.protocol:ProtocolLib:4.7.0") {
compileOnly("com.comphenix.protocol:ProtocolLib:5.0.0-SNAPSHOT") {
// this dep wasn"t being resolved.
exclude(group = "com.comphenix.executors")
}
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version=0.3
version=0.4
group=com.mineinabyss
kotlinVersion=1.6.10
serverVersion=1.18.2-R0.1-SNAPSHOT
idofrontVersion=0.9.88
serverVersion=1.19-R0.1-SNAPSHOT
idofrontVersion=0.11.95
publishComponentName=java
6 changes: 6 additions & 0 deletions gradle/mylibs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[versions]

[libraries]
kotlinpoet = "com.squareup:kotlinpoet:1.10.1"
reflections = "org.reflections:reflections:0.9.12"
minecraft-plugin-protocollib = "com.comphenix.protocol:ProtocolLib:5.0.0-SNAPSHOT"
23 changes: 7 additions & 16 deletions protocolburrito-generator/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,25 @@ val serverVersion: String by project

plugins {
kotlin("jvm")
id("io.papermc.paperweight.userdev")
id("com.mineinabyss.conventions.nms")
}

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

dependencies {
paperDevBundle(serverVersion)
implementation(kotlin("reflect"))
implementation("io.papermc.paper:paper-server:userdev-1.18.2-R0.1-SNAPSHOT")
implementation("com.comphenix.protocol:ProtocolLib:4.7.0")
implementation("com.nfeld.jsonpathkt:jsonpathkt:2.0.0")
implementation("com.squareup:kotlinpoet:1.10.1")
implementation("io.papermc.paper:paper-server:userdev-$serverVersion")
implementation(mylibs.minecraft.plugin.protocollib)
implementation(mylibs.kotlinpoet)
implementation(mylibs.reflections)
implementation(project(":protocolburrito-api"))

// implementation("com.google.devtools.ksp:symbol-processing-api:1.6.10-1.0.2")
// compileOnly("com.google.auto.service:auto-service:1.0")
implementation("org.reflections:reflections:0.9.12")
implementation(kotlin("reflect"))
}

configurations {
remove(findByName("reobf"))
}
Expand All @@ -43,8 +39,3 @@ tasks {
dependsOn(generateBurrito)
}
}
//sourceSets.main {
// java.srcDirs("src/main/kotlin")
//}


Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ import kotlin.reflect.full.declaredMemberProperties
import kotlin.reflect.jvm.jvmErasure
import kotlin.reflect.typeOf

//val SERVER_VERSION = "1.17"
//val PROJECT_ROOT = File("")//File(AnnotationProcessor.generatedDir)//.parentFile.parentFile.parentFile.parentFile.parentFile
//val SERVER_PATH = File(PROJECT_ROOT, "minecraft-data/data/pc/$SERVER_VERSION/")
//val MAPPINGS = File(PROJECT_ROOT, "mappings/server.txt")
val OUTPUT_DIR = File("build/generated/burrito/main/")

fun generateProtocolExtensions() {
Expand All @@ -32,6 +28,7 @@ fun generateProtocolExtensions() {
val type = field.returnType
if (field.visibility == KVisibility.PUBLIC) return@mapNotNull null
if (field.returnType.jvmErasure.visibility != KVisibility.PUBLIC) return@mapNotNull null
if (field.returnType.arguments.any { it.type?.jvmErasure?.visibility != KVisibility.PUBLIC }) return@mapNotNull null
val index = indices.getOrPut(type) { AtomicInteger(0) }
PropertySpec.builder(field.name, type.asTypeName().copy(annotations = listOf())) //.let {
.getter(
Expand Down
17 changes: 8 additions & 9 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
mavenLocal()
google()
maven("https://repo.mineinabyss.com/releases")
maven("https://papermc.io/repo/repository/maven-public/")
maven("https://repo.papermc.io/repository/maven-public/")
}

plugins {
Expand All @@ -17,25 +18,23 @@ pluginManagement {
kotlin("plugin.serialization") version kotlinVersion
}

resolutionStrategy {
eachPlugin {
if (requested.id.id.startsWith("com.mineinabyss.conventions"))
useVersion(idofrontVersion)
}
resolutionStrategy.eachPlugin {
if (requested.id.id.startsWith("com.mineinabyss.conventions"))
useVersion(idofrontVersion)
}
}

dependencyResolutionManagement {
val idofrontVersion: String by settings

repositories {
mavenLocal()
maven("https://repo.mineinabyss.com/releases")
}

versionCatalogs {
create("libs") {
from("com.mineinabyss:catalog:$idofrontVersion")
}
create("libs").from("com.mineinabyss:catalog:$idofrontVersion")
create("mylibs").from(files("gradle/mylibs.versions.toml"))
}
}

Expand Down

0 comments on commit d8e4975

Please sign in to comment.