NX01: Rename nether to top level for preparing dial tones

This commit is contained in:
Willem Cazander 2026-01-23 11:54:16 +01:00
parent 4af51ad9ae
commit e69a13ec92
12 changed files with 122 additions and 40 deletions

View file

@ -10,7 +10,7 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>love.distributedrebirth.nx01</groupId> <groupId>love.distributedrebirth.nx01</groupId>
<artifactId>nx01-jpp-klass-nether</artifactId> <artifactId>nx01-jpp-nether-tone</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>love.distributedrebirth.nx01</groupId> <groupId>love.distributedrebirth.nx01</groupId>

View file

@ -0,0 +1,21 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>love.distributedrebirth.nx01</groupId>
<artifactId>nx01</artifactId>
<version>5786.SHEVAT〄.1-SNAPSHOT</version>
</parent>
<artifactId>nx01-jpp-nether-dial-based</artifactId>
<dependencies>
<dependency>
<groupId>love.distributedrebirth.nx01</groupId>
<artifactId>nx01-jpp-nether-tone</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>

View file

@ -0,0 +1,21 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>love.distributedrebirth.nx01</groupId>
<artifactId>nx01</artifactId>
<version>5786.SHEVAT〄.1-SNAPSHOT</version>
</parent>
<artifactId>nx01-jpp-nether-dial-lingua</artifactId>
<dependencies>
<dependency>
<groupId>love.distributedrebirth.nx01</groupId>
<artifactId>nx01-jpp-nether-tone</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>

View file

@ -6,7 +6,7 @@
<artifactId>nx01</artifactId> <artifactId>nx01</artifactId>
<version>5786.SHEVAT〄.1-SNAPSHOT</version> <version>5786.SHEVAT〄.1-SNAPSHOT</version>
</parent> </parent>
<artifactId>nx01-jpp-klass-nether</artifactId> <artifactId>nx01-jpp-nether-tone</artifactId>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.junit.jupiter</groupId> <groupId>org.junit.jupiter</groupId>
@ -55,7 +55,7 @@
failonerror="true"> failonerror="true">
<!-- using test CP so local module gets resolved correctly --> <!-- using test CP so local module gets resolved correctly -->
<classpath refid="maven.test.classpath" /> <classpath refid="maven.test.classpath" />
<arg line="tones" /> <arg line="nether-tones" />
<arg line="generate" /> <arg line="generate" />
</java> </java>
</target> </target>

View file

@ -28,6 +28,6 @@
/// The nether tone tree slug index. /// The nether tone tree slug index.
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天 /// @version ©Δ 仙上主天
module jpp.klass.nether { module jpp.nether.tone {
} }

View file

@ -25,7 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
package ᒢᐩᐩ.ᑊᑉᒻᣔᔆᔆ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ; package ᒢᐩᐩ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

View file

@ -25,11 +25,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
package love.distributedrebirth.nx01.kode.generator; package ᒢᐩᐩ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ;
import java.util.Iterator; import java.util.Iterator;
import java.util.stream.Stream; import java.util.stream.Stream;
import love.distributedrebirth.nx01.kode.generator.KodeGenModel;
import love.distributedrebirth.nx01.kode.generator.klass.ModelKlass; import love.distributedrebirth.nx01.kode.generator.klass.ModelKlass;
import love.distributedrebirth.nx01.kode.generator.klass.ModelKlassWriter; import love.distributedrebirth.nx01.kode.generator.klass.ModelKlassWriter;
@ -39,6 +40,13 @@ import love.distributedrebirth.nx01.kode.generator.klass.ModelKlassWriter;
/// @version ©Δ 仙上主天 /// @version ©Δ 仙上主天
public class ModelNetherTones implements KodeGenModel { public class ModelNetherTones implements KodeGenModel {
private final String BASE_PACK = "ᒢᐩᐩ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ";
@Override
public String generatorName() {
return "nether-tones";
}
@Override @Override
public void buildModels(ModelKlassWriter writer) { public void buildModels(ModelKlassWriter writer) {
buildQuadrants(writer, 1, "ᐧᐧᐧ"); buildQuadrants(writer, 1, "ᐧᐧᐧ");
@ -73,8 +81,8 @@ public class ModelNetherTones implements KodeGenModel {
} }
private void buildNetherTreeSlug(ModelKlassWriter writer, String subPackage, String javaName, int slugSize, String quadrant) { private void buildNetherTreeSlug(ModelKlassWriter writer, String subPackage, String javaName, int slugSize, String quadrant) {
ModelKlass klass = new ModelKlass("ᒢᐩᐩ.ᑊᑉᒻᣔᔆᔆ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ." + subPackage, javaName); ModelKlass klass = new ModelKlass(BASE_PACK + "." + subPackage, javaName);
klass.addJavaImport("ᒢᐩᐩ.ᑊᑉᒻᣔᔆᔆ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ." + quadrant); klass.addJavaImport(BASE_PACK + "." + quadrant);
writer.addModelKlass(klass); writer.addModelKlass(klass);
StringBuilder buf = klass.getBody(); StringBuilder buf = klass.getBody();
buf.append("public sealed interface "); buf.append("public sealed interface ");
@ -90,7 +98,7 @@ public class ModelNetherTones implements KodeGenModel {
} }
buf.append("}\n"); buf.append("}\n");
ModelKlass klassMutex = new ModelKlass("ᒢᐩᐩ.ᑊᑉᒻᣔᔆᔆ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ." + subPackage, javaName + "Mutex"); ModelKlass klassMutex = new ModelKlass(BASE_PACK + "." + subPackage, javaName + "Mutex");
writer.addModelKlass(klassMutex); writer.addModelKlass(klassMutex);
StringBuilder bufMutex = klassMutex.getBody(); StringBuilder bufMutex = klassMutex.getBody();
bufMutex.append("interface "); bufMutex.append("interface ");
@ -100,7 +108,7 @@ public class ModelNetherTones implements KodeGenModel {
} }
private void buildNetherQuadrant(ModelKlassWriter writer, String javaName, String javaSearch, boolean child) { private void buildNetherQuadrant(ModelKlassWriter writer, String javaName, String javaSearch, boolean child) {
ModelKlass klass = new ModelKlass("ᒢᐩᐩ.ᑊᑉᒻᣔᔆᔆ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ", javaName); ModelKlass klass = new ModelKlass(BASE_PACK, javaName);
StringBuilder buf = klass.getBody(); StringBuilder buf = klass.getBody();
buf.append("public sealed interface "); buf.append("public sealed interface ");
buf.append(klass.getJavaName()); buf.append(klass.getJavaName());

View file

@ -25,24 +25,25 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
package ᒢᐩᐩ.ᑊᑉᒻᣔᔆᔆ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ; package ᒢᐩᐩ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ;
import java.util.List; import java.util.List;
import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import ᒢᐩᐩ.ᑊᑉᒻᣔᔆᔆ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ.ᐧᐧᐧ.ᐊQ1AG1; import ᒢᐩᐩ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ.ᐧᐧᐧ.ᐊQ1AG1;
import ᒢᐩᐩ.ᑊᑉᒻᣔᔆᔆ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ.ᐧᐧᐧ.ᐊQ1AG2; import ᒢᐩᐩ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ.ᐧᐧᐧ.ᐊQ1AG2;
import ᒢᐩᐩ.ᑊᑉᒻᣔᔆᔆ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ.ᐧᐧᐧ.ᐊQ1AG3; import ᒢᐩᐩ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ.ᐧᐧᐧ.ᐊQ1AG3;
import ᒢᐩᐩ.ᑊᑉᒻᣔᔆᔆ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ.ᐧᐧᐧ.ᐊQ1BL0W; import ᒢᐩᐩ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ.ᐧᐧᐧ.ᐊQ1BL0W;
import ᒢᐩᐩ.ᑊᑉᒻᣔᔆᔆ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ.ᐧᐧᐧ.ᐊQ1CR1; import ᒢᐩᐩ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ.ᐧᐧᐧ.ᐊQ1CR1;
import ᒢᐩᐩ.ᑊᑉᒻᣔᔆᔆ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ.ᐧᐧᐧ.ᐊQ1CR2; import ᒢᐩᐩ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ.ᐧᐧᐧ.ᐊQ1CR2;
import ᒢᐩᐩ.ᑊᑉᒻᣔᔆᔆ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ.ᐧᐧᐧ.ᐊQ1CR3; import ᒢᐩᐩ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ.ᐧᐧᐧ.ᐊQ1CR3;
import ᒢᐩᐩ.ᑊᑉᒻᣔᔆᔆ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ.ᐧᐧᐧ.ᐊQ1DB1; import ᒢᐩᐩ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ.ᐧᐧᐧ.ᐊQ1DB1;
import ᒢᐩᐩ.ᑊᑉᒻᣔᔆᔆ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ.ᐧᐧᐧ.ᐊQ1DB2; import ᒢᐩᐩ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ.ᐧᐧᐧ.ᐊQ1DB2;
import ᒢᐩᐩ.ᑊᑉᒻᣔᔆᔆ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ.ᐧᐧᐧ.ᐊQ1DB3; import ᒢᐩᐩ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ.ᐧᐧᐧ.ᐊQ1DB3;
import ᒢᐩᐩ.ᑊᑉᒻᣔᔆᔆ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ.ᐧᐧᐧ.ᐊQ1ER0W; import ᒢᐩᐩ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ.ᐧᐧᐧ.ᐊQ1ER0W;
import ᒢᐩᐩ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ.NetherToneSlugView;
public class NetherToneSlugViewTest { public class NetherToneSlugViewTest {

View file

@ -0,0 +1 @@
ᒢᐩᐩ.ᣕᓫᐪᑋᓫᣗ.ᐪᐤᣕᓫ.ModelNetherTones

View file

@ -31,8 +31,8 @@ import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import java.util.Arrays; import java.util.Iterator;
import java.util.List; import java.util.ServiceLoader;
import love.distributedrebirth.nx01.kode.generator.klass.ModelKlassWriter; import love.distributedrebirth.nx01.kode.generator.klass.ModelKlassWriter;
@ -45,23 +45,28 @@ public class KodeGen {
private final static String SERIAL_VERSON_ID = "13"; private final static String SERIAL_VERSON_ID = "13";
public static void main(String[] args) throws IOException { public static void main(String[] args) throws IOException {
if (skipCommand()) { if (args.length == 0) {
System.out.println("SKIPPED: Generated source are up to date");
return;
}
List<String> argu = Arrays.asList(args);
boolean writeToFile = argu.contains("generate");
String commandDesc = null;
KodeGenModel commandKode = null;
if (argu.contains("tones")) {
commandDesc = "nether tones";
commandKode = new ModelNetherTones();
} else {
System.err.println("No command given."); System.err.println("No command given.");
System.exit(1); System.exit(1);
return; return;
} }
String command = args[0];
KodeGenModel commandKode = findCommandModel(command);
if (commandKode == null) {
System.err.println("Command unknown: " + command);
System.exit(1);
return;
}
boolean writeToFile = false;
if (args.length > 1 && "generate".equals(args[1])) {
writeToFile = true;
}
if (skipCommand()) {
System.out.println("SKIPPED: Generated source are up to date");
return;
}
// write all sources to files or stdout // write all sources to files or stdout
String commandDesc = commandKode.generatorName();
System.out.println("Generating " + commandDesc); System.out.println("Generating " + commandDesc);
ModelKlassWriter writer = new ModelKlassWriter("target/generated-sources"); ModelKlassWriter writer = new ModelKlassWriter("target/generated-sources");
writer.setProlog(new File("../licence.txt")); writer.setProlog(new File("../licence.txt"));
@ -70,6 +75,17 @@ public class KodeGen {
System.out.println("Done " + commandDesc); System.out.println("Done " + commandDesc);
} }
private static KodeGenModel findCommandModel(String generatorName) {
Iterator<KodeGenModel> models = ServiceLoader.load(KodeGenModel.class).iterator();
while (models.hasNext()) {
KodeGenModel model = models.next();
if (model.generatorName().equals(generatorName)) {
return model;
}
}
return null;
}
private static boolean skipCommand() throws IOException { private static boolean skipCommand() throws IOException {
Path hashFile = new File("target/generated-sources.hash").toPath(); Path hashFile = new File("target/generated-sources.hash").toPath();
if (hashFile.toFile().exists()) { if (hashFile.toFile().exists()) {

View file

@ -35,5 +35,7 @@ import love.distributedrebirth.nx01.kode.generator.klass.ModelKlassWriter;
/// @version ©Δ 仙上主天 /// @version ©Δ 仙上主天
public interface KodeGenModel { public interface KodeGenModel {
String generatorName();
void buildModels(ModelKlassWriter writer); void buildModels(ModelKlassWriter writer);
} }

18
pom.xml
View file

@ -24,11 +24,15 @@
<description>Runtime for static bass noise ௸..</description> <description>Runtime for static bass noise ௸..</description>
<modules> <modules>
<module>nx01-jpp-base</module> <module>nx01-jpp-base</module>
<module>nx01-jpp-nether-dial-based</module>
<module>nx01-jpp-nether-dial-lingua</module>
<module>nx01-jpp-nether-tone</module>
<module>nx01-king-java3</module> <module>nx01-king-java3</module>
<module>nx01-king-java3c</module> <module>nx01-king-java3c</module>
<module>nx01-king-java3do</module> <module>nx01-king-java3do</module>
<module>nx01-king-java3doc</module> <module>nx01-king-java3doc</module>
<module>nx01-king-java3seed</module> <module>nx01-king-java3seed</module>
<module>nx01-kode-gen</module>
<module>nx01-mushroom-mais</module> <module>nx01-mushroom-mais</module>
<module>nx01-mushroom-mais-duytsdoc</module> <module>nx01-mushroom-mais-duytsdoc</module>
<module>nx01-mushroom-mais-fc18</module> <module>nx01-mushroom-mais-fc18</module>
@ -56,8 +60,6 @@
<module>nx01-x4o-tool-ant-plugin</module> <module>nx01-x4o-tool-ant-plugin</module>
<module>nx01-x4o-tool-maven-plugin</module> <module>nx01-x4o-tool-maven-plugin</module>
<module>nx01-zerofungus-server</module> <module>nx01-zerofungus-server</module>
<module>nx01-kode-gen</module>
<module>nx01-jpp-klass-nether</module>
</modules> </modules>
<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>
@ -259,7 +261,17 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>love.distributedrebirth.nx01</groupId> <groupId>love.distributedrebirth.nx01</groupId>
<artifactId>nx01-jpp-klass-nether</artifactId> <artifactId>nx01-jpp-nether-tone</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>love.distributedrebirth.nx01</groupId>
<artifactId>nx01-jpp-nether-dial-based</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>love.distributedrebirth.nx01</groupId>
<artifactId>nx01-jpp-nether-dial-lingua</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>