move to domain namespace

This commit is contained in:
moehreag 2024-06-02 23:13:58 +02:00
parent 999dad62bc
commit 3e21b4d8d5
16 changed files with 58 additions and 60 deletions

View file

@ -4,17 +4,17 @@ plugins {
`maven-publish` `maven-publish`
} }
group = "org.ecorous.frogmc" group = "dev.frogmc"
version = "0.0.1-SNAPSHOT" version = "0.0.1-SNAPSHOT"
repositories { repositories {
maven { maven {
name = "FrogMC Maven Releases" name = "FrogMC Maven Releases"
url = uri("https://maven-frogmc.ecorous.org/releases") url = uri("https://maven.frogmc.dev/releases")
} }
maven { maven {
name = "FrogMC Maven Snapshots" name = "FrogMC Maven Snapshots"
url = uri("https://maven-frogmc.ecorous.org/snapshots") url = uri("https://maven.frogmc.dev/snapshots")
} }
mavenCentral() mavenCentral()
@ -33,8 +33,8 @@ dependencies {
gradlePlugin { gradlePlugin {
plugins { plugins {
create("phytotelma") { create("phytotelma") {
id = "org.ecorous.frogmc.phytotelma" id = "dev.frogmc.phytotelma"
implementationClass = "org.ecorous.frogmc.phytotelma.PhytotelmaPlugin" implementationClass = "dev.frogmc.phytotelma.PhytotelmaPlugin"
} }
} }
} }
@ -60,7 +60,7 @@ publishing {
repositories { repositories {
maven { maven {
name = "FrogMCSnapshotsMaven" name = "FrogMCSnapshotsMaven"
url = uri("https://maven-frogmc.ecorous.org/snapshots") url = uri("https://maven.frogmc.dev/snapshots")
credentials(PasswordCredentials::class) credentials(PasswordCredentials::class)
authentication { authentication {
create<BasicAuthentication>("basic") create<BasicAuthentication>("basic")
@ -69,7 +69,7 @@ publishing {
maven { maven {
name = "FrogMCReleasesMaven" name = "FrogMCReleasesMaven"
url = uri("https://maven-frogmc.ecorous.org/releases") url = uri("https://maven.frogmc.dev/releases")
credentials(PasswordCredentials::class) credentials(PasswordCredentials::class)
authentication { authentication {
create<BasicAuthentication>("basic") create<BasicAuthentication>("basic")

View file

@ -1,4 +1,4 @@
package org.ecorous.frogmc.phytotelma package dev.frogmc.phytotelma
import com.electronwill.nightconfig.core.CommentedConfig import com.electronwill.nightconfig.core.CommentedConfig
import com.electronwill.nightconfig.core.file.FileNotFoundAction import com.electronwill.nightconfig.core.file.FileNotFoundAction
@ -6,13 +6,13 @@ import com.electronwill.nightconfig.core.io.WritingMode
import com.electronwill.nightconfig.toml.TomlParser import com.electronwill.nightconfig.toml.TomlParser
import com.electronwill.nightconfig.toml.TomlWriter import com.electronwill.nightconfig.toml.TomlWriter
import net.fabricmc.fernflower.api.IFabricJavadocProvider import net.fabricmc.fernflower.api.IFabricJavadocProvider
import org.ecorous.frogmc.phytotelma.accesswidener.AccessWidener import dev.frogmc.phytotelma.accesswidener.AccessWidener
import org.ecorous.frogmc.phytotelma.common.Env import dev.frogmc.phytotelma.common.Env
import org.ecorous.frogmc.phytotelma.nest.Nester import dev.frogmc.phytotelma.nest.Nester
import org.ecorous.frogmc.phytotelma.run.AssetDownloader import dev.frogmc.phytotelma.run.AssetDownloader
import org.ecorous.frogmc.phytotelma.run.RunConfigGenerator import dev.frogmc.phytotelma.run.RunConfigGenerator
import org.ecorous.frogmc.phytotelma.run.task.RunGameTask import dev.frogmc.phytotelma.run.task.RunGameTask
import org.ecorous.frogmc.phytotelma.vineflower.ParchmentJavadocProvider import dev.frogmc.phytotelma.vineflower.ParchmentJavadocProvider
import org.ecorous.frogmc.thyroxine.provider.ParchmentProvider import org.ecorous.frogmc.thyroxine.provider.ParchmentProvider
import org.gradle.api.Plugin import org.gradle.api.Plugin
import org.gradle.api.Project import org.gradle.api.Project
@ -48,11 +48,11 @@ class PhytotelmaPlugin : Plugin<Project> {
project.repositories.apply { project.repositories.apply {
maven { maven {
it.name = "FrogMC Releases" it.name = "FrogMC Releases"
it.url = URI.create("https://maven-frogmc.ecorous.org/releases") it.url = URI.create("https://maven.frogmc.dev/releases")
} }
maven { maven {
it.name = "FrogMC Snapshots" it.name = "FrogMC Snapshots"
it.url = URI.create("https://maven-frogmc.ecorous.org/snapshots") it.url = URI.create("https://maven.frogmc.dev/snapshots")
} }
maven { maven {
it.name = "Minecraft/Local" it.name = "Minecraft/Local"

View file

@ -1,8 +1,8 @@
package org.ecorous.frogmc.phytotelma package dev.frogmc.phytotelma
import com.google.gson.Gson import com.google.gson.Gson
import com.google.gson.GsonBuilder import com.google.gson.GsonBuilder
import org.ecorous.frogmc.phytotelma.common.CachingHttpClient import dev.frogmc.phytotelma.common.CachingHttpClient
import java.net.URI import java.net.URI
import java.nio.file.Files import java.nio.file.Files
import java.nio.file.Path import java.nio.file.Path
@ -18,17 +18,15 @@ object VersionChecker {
val clientData = fetchClientDownload(version) val clientData = fetchClientDownload(version)
// download client data // download client data
val downloadDirectory = PhytotelmaPlugin.nonsenseCacheDir.resolve("net/minecraft/client/$version/") val downloadDirectory = PhytotelmaPlugin.nonsenseCacheDir.resolve("net/minecraft/client/$version/")
println("Directory: "+downloadDirectory.absolutePathString())
val downloadFile = downloadDirectory.resolve("client-$version.jar") val downloadFile = downloadDirectory.resolve("client-$version.jar")
if (downloadFile.exists()) { if (downloadFile.exists()) {
println("Client already downloaded to $downloadFile. Assuming it's valid. FIXME: Add checksum validation.") println("Client already downloaded! Assuming it's valid. FIXME: Add checksum validation.")
return downloadFile return downloadFile
} }
downloadDirectory.createDirectories() downloadDirectory.createDirectories()
val raw = rawDownload(clientData.url) val raw = rawDownload(clientData.url)
downloadFile.writeBytes(raw) downloadFile.writeBytes(raw)
savePomFile(version, downloadDirectory) savePomFile(version, downloadDirectory)
println("Downloaded client to $downloadFile")
return downloadFile return downloadFile
} }

View file

@ -1,4 +1,4 @@
package org.ecorous.frogmc.phytotelma.accesswidener package dev.frogmc.phytotelma.accesswidener
import com.electronwill.nightconfig.core.file.FileNotFoundAction import com.electronwill.nightconfig.core.file.FileNotFoundAction
import com.electronwill.nightconfig.toml.TomlParser import com.electronwill.nightconfig.toml.TomlParser

View file

@ -1,6 +1,6 @@
package org.ecorous.frogmc.phytotelma.common package dev.frogmc.phytotelma.common
import org.ecorous.frogmc.phytotelma.PhytotelmaPlugin import dev.frogmc.phytotelma.PhytotelmaPlugin
import java.io.InputStream import java.io.InputStream
import java.net.URI import java.net.URI
import java.nio.charset.StandardCharsets import java.nio.charset.StandardCharsets

View file

@ -1,4 +1,4 @@
package org.ecorous.frogmc.phytotelma.common package dev.frogmc.phytotelma.common
enum class Env(val id: String, val pascalName: String) { enum class Env(val id: String, val pascalName: String) {
SERVER("server", "Server"), SERVER("server", "Server"),

View file

@ -1,4 +1,4 @@
package org.ecorous.frogmc.phytotelma.common package dev.frogmc.phytotelma.common
fun sanitizeXmlValue(value: String): String { fun sanitizeXmlValue(value: String): String {
return value.replace("&", "&amp;").replace("\"", "&quot;") return value.replace("&", "&amp;").replace("\"", "&quot;")

View file

@ -1,9 +1,9 @@
package org.ecorous.frogmc.phytotelma.ext package dev.frogmc.phytotelma.ext
import org.ecorous.frogmc.phytotelma.PhytotelmaPlugin import dev.frogmc.phytotelma.PhytotelmaPlugin
import org.ecorous.frogmc.phytotelma.VersionChecker import dev.frogmc.phytotelma.VersionChecker
import org.ecorous.frogmc.phytotelma.accesswidener.AccessWidener import dev.frogmc.phytotelma.accesswidener.AccessWidener
import org.ecorous.frogmc.phytotelma.run.RunConfigGenerator import dev.frogmc.phytotelma.run.RunConfigGenerator
import org.ecorous.frogmc.thyroxine.Thyroxine import org.ecorous.frogmc.thyroxine.Thyroxine
import org.ecorous.frogmc.thyroxine.parser.ProguardParser import org.ecorous.frogmc.thyroxine.parser.ProguardParser
import org.ecorous.frogmc.thyroxine.provider.MojmapProvider import org.ecorous.frogmc.thyroxine.provider.MojmapProvider
@ -89,7 +89,7 @@ fun Project.minecraft(
} }
fun Project.loader(version: String) { fun Project.loader(version: String) {
dependencies.add("implementation", "org.ecorous.frogmc:frogloader:$version") dependencies.add("implementation", "dev.frogmc:frogloader:$version")
} }
fun Project.loader(version: Provider<String>) { fun Project.loader(version: Provider<String>) {

View file

@ -1,4 +1,4 @@
package org.ecorous.frogmc.phytotelma.nest package dev.frogmc.phytotelma.nest
import com.electronwill.nightconfig.core.Config import com.electronwill.nightconfig.core.Config
import com.electronwill.nightconfig.core.UnmodifiableConfig import com.electronwill.nightconfig.core.UnmodifiableConfig

View file

@ -1,10 +1,10 @@
package org.ecorous.frogmc.phytotelma.run package dev.frogmc.phytotelma.run
import com.google.gson.Gson import com.google.gson.Gson
import com.google.gson.JsonObject import com.google.gson.JsonObject
import org.ecorous.frogmc.phytotelma.PhytotelmaPlugin import dev.frogmc.phytotelma.PhytotelmaPlugin
import org.ecorous.frogmc.phytotelma.VersionChecker import dev.frogmc.phytotelma.VersionChecker
import org.ecorous.frogmc.phytotelma.common.CachingHttpClient import dev.frogmc.phytotelma.common.CachingHttpClient
import java.net.URI import java.net.URI
import java.nio.charset.StandardCharsets import java.nio.charset.StandardCharsets
import java.nio.file.Path import java.nio.file.Path

View file

@ -1,4 +1,4 @@
package org.ecorous.frogmc.phytotelma.run package dev.frogmc.phytotelma.run
import org.gradle.api.Project import org.gradle.api.Project

View file

@ -1,10 +1,10 @@
package org.ecorous.frogmc.phytotelma.run package dev.frogmc.phytotelma.run
import org.ecorous.frogmc.phytotelma.PhytotelmaPlugin import dev.frogmc.phytotelma.PhytotelmaPlugin
import org.ecorous.frogmc.phytotelma.VersionChecker import dev.frogmc.phytotelma.VersionChecker
import org.ecorous.frogmc.phytotelma.common.Env import dev.frogmc.phytotelma.common.Env
import org.ecorous.frogmc.phytotelma.run.adapter.EclipseAdapter import dev.frogmc.phytotelma.run.adapter.EclipseAdapter
import org.ecorous.frogmc.phytotelma.run.adapter.IdeaAdapter import dev.frogmc.phytotelma.run.adapter.IdeaAdapter
import org.gradle.api.Project import org.gradle.api.Project
import org.gradle.api.logging.configuration.ConsoleOutput import org.gradle.api.logging.configuration.ConsoleOutput
import java.nio.file.Files import java.nio.file.Files
@ -42,7 +42,7 @@ object RunConfigGenerator {
adapter.generate( adapter.generate(
project, project,
"Minecraft ${env.pascalName}", "Minecraft ${env.pascalName}",
"org.ecorous.frogmc.frogloader.impl.launch.${env.id}.Nonsense${env.pascalName}", "dev.frogmc.frogloader.impl.launch.${env.id}.Nonsense${env.pascalName}",
mutableListOf( mutableListOf(
"-Xmx${project.properties.getOrDefault("frogmc.gameHeap", "2048M")}", "-Xmx${project.properties.getOrDefault("frogmc.gameHeap", "2048M")}",
"-Dfrogmc.development=true", "-Dfrogmc.development=true",

View file

@ -1,8 +1,8 @@
package org.ecorous.frogmc.phytotelma.run.adapter package dev.frogmc.phytotelma.run.adapter
import org.ecorous.frogmc.phytotelma.common.formatXmlList import dev.frogmc.phytotelma.common.formatXmlList
import org.ecorous.frogmc.phytotelma.common.sanitizeXmlValue import dev.frogmc.phytotelma.common.sanitizeXmlValue
import org.ecorous.frogmc.phytotelma.run.RunConfigAdapter import dev.frogmc.phytotelma.run.RunConfigAdapter
import org.gradle.api.Project import org.gradle.api.Project
import org.gradle.plugins.ide.eclipse.model.EclipseModel import org.gradle.plugins.ide.eclipse.model.EclipseModel
import java.nio.charset.StandardCharsets import java.nio.charset.StandardCharsets

View file

@ -1,8 +1,8 @@
package org.ecorous.frogmc.phytotelma.run.adapter package dev.frogmc.phytotelma.run.adapter
import org.ecorous.frogmc.phytotelma.common.formatXmlList import dev.frogmc.phytotelma.common.formatXmlList
import org.ecorous.frogmc.phytotelma.common.sanitizeXmlValue import dev.frogmc.phytotelma.common.sanitizeXmlValue
import org.ecorous.frogmc.phytotelma.run.RunConfigAdapter import dev.frogmc.phytotelma.run.RunConfigAdapter
import org.gradle.api.Project import org.gradle.api.Project
import org.gradle.api.plugins.JavaPluginExtension import org.gradle.api.plugins.JavaPluginExtension
import org.gradle.api.tasks.SourceSet import org.gradle.api.tasks.SourceSet

View file

@ -1,8 +1,8 @@
package org.ecorous.frogmc.phytotelma.run.task package dev.frogmc.phytotelma.run.task
import org.ecorous.frogmc.phytotelma.PhytotelmaPlugin import dev.frogmc.phytotelma.PhytotelmaPlugin
import org.ecorous.frogmc.phytotelma.VersionChecker import dev.frogmc.phytotelma.VersionChecker
import org.ecorous.frogmc.phytotelma.common.Env import dev.frogmc.phytotelma.common.Env
import org.gradle.api.file.ConfigurableFileCollection import org.gradle.api.file.ConfigurableFileCollection
import org.gradle.api.file.FileCollection import org.gradle.api.file.FileCollection
import org.gradle.api.logging.configuration.ConsoleOutput import org.gradle.api.logging.configuration.ConsoleOutput
@ -65,7 +65,7 @@ abstract class RunGameTask @Inject constructor(env: Env) : JavaExec() {
jvmArguments.add("-Dfrogmc.log.disableAnsi=false") jvmArguments.add("-Dfrogmc.log.disableAnsi=false")
} }
mainClass.set("org.ecorous.frogmc.frogloader.impl.launch.${env.id}.Nonsense${env.pascalName}") mainClass.set("dev.frogmc.frogloader.impl.launch.${env.id}.Nonsense${env.pascalName}")
} }
private fun writeArgFile(): String { private fun writeArgFile(): String {

View file

@ -1,4 +1,4 @@
package org.ecorous.frogmc.phytotelma.vineflower package dev.frogmc.phytotelma.vineflower
import net.fabricmc.fernflower.api.IFabricJavadocProvider import net.fabricmc.fernflower.api.IFabricJavadocProvider
import org.ecorous.frogmc.thyroxine.api.data.Parchment import org.ecorous.frogmc.thyroxine.api.data.Parchment