Skip to content

Commit

Permalink
完善式更新
Browse files Browse the repository at this point in the history
参考dove home team的模组
  • Loading branch information
baka4n committed Jan 12, 2024
1 parent caf19da commit 394c9d0
Show file tree
Hide file tree
Showing 296 changed files with 365 additions and 329 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import io.github.xenfork.acl.mappings.Type;

public class AclExtensions {
private String mcversion, group, project$name, srg, flv, architectury$version, fapi;
private String mcversion, group, project$name, srg, flv, architectury$version, fapi, fgv;
public String srg_out = "";
public Type mappings;

Expand Down Expand Up @@ -81,4 +81,12 @@ public String getFapi() {
public void setFapi(String fapi) {
this.fapi = fapi;
}

public String getFgv() {
return fgv;
}

public void setFgv(String fgv) {
this.fgv = fgv;
}
}
22 changes: 22 additions & 0 deletions core/src/main/java/io/github/xenfork/acl/projects/sub/Basic.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
import java.io.IOException;

import static io.github.xenfork.acl.projects.SubProjects.loom;
import static io.github.xenfork.acl.settings.MainSettings.acl;

public class Basic implements Plugin<Project> {
public String archivesBaseName, loader;
public DependencyHandler dependencies;
@Override
public void apply(@NotNull Project target) {
archivesBaseName = target.getName().split("-")[0];
Expand All @@ -35,5 +37,25 @@ public void apply(@NotNull Project target) {
target.apply(act -> {
act.from(file.getAbsolutePath());
});
dependencies = target.getDependencies();
flvDepends();
architecturyDepends();
}

private void architecturyDepends() {
if (loader.equals("common")) {
dependencies.add("modApi", "dev.architectury:architectury:" + acl.getArchitectury$version());
} else {
dependencies.add("modApi", "dev.architectury:architectury-" + loader + ":" + acl.getArchitectury$version());
}
}

private void flvDepends() {
if (loader.equals("common") || loader.equals("fabric")) {
if (!acl.getFlv().isEmpty()) {
dependencies.add("modImplementation", "net.fabricmc:fabric-loader:" + acl.getFlv());
}
}

}
}
23 changes: 8 additions & 15 deletions core/src/main/java/io/github/xenfork/acl/projects/sub/Common.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.github.xenfork.acl.projects.sub;

import io.github.xenfork.acl.projects.Main;
import io.github.xenfork.acl.settings.MainSettings;
import net.fabricmc.loom.LoomGradleExtension;
import net.fabricmc.loom.api.LoomGradleExtensionAPI;
import org.gradle.api.Plugin;
Expand All @@ -13,24 +14,16 @@

import java.io.File;

import static io.github.xenfork.acl.settings.MainSettings.acl;

public class Common extends Basic {
@Override
public void apply(@NotNull Project target) {
super.apply(target);
// target.afterEvaluate(project -> {
// SourceSetContainer sourceSets = project.getExtensions().getByType(SourceSetContainer.class);
// SourceDirectorySet main = sourceSets.getByName("main").getResources();
// main.getSrcDirs().add(project.file("src/main/generated/resources"));
// main.exclude(".cache");
// ExtensionContainer extensions = project.getExtensions();
// LoomGradleExtensionAPI loom = extensions.getByType(LoomGradleExtensionAPI.class);
// File file = project.file("src/main/resources/" + extensions.getExtraProperties().get("archivesBaseName") + ".accesswidener");
// if (file.exists()) {
// loom.getAccessWidenerPath().set(file);
// }
// DependencyHandler dependencies = project.getDependencies();
// dependencies.add("modImplementation", "net.fabricmc:fabric-loader:" + Main.acl.getFlv());
//
// });
DependencyHandler dependencies = target.getDependencies();

if (!acl.getArchitectury$version().isEmpty()) {

}
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
package io.github.xenfork.acl.projects.sub;

import io.github.xenfork.acl.settings.MainSettings;
import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.jetbrains.annotations.NotNull;

import static io.github.xenfork.acl.settings.MainSettings.acl;

public class Fabric extends Basic {
@Override
public void apply(@NotNull Project target) {
super.apply(target);
if (!acl.getFapi().isEmpty()) {
dependencies.add("modApi", "net.fabricmc.fabric-api:fabric-api:" + acl.getFapi());
}
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
package io.github.xenfork.acl.projects.sub;

import io.github.xenfork.acl.settings.MainSettings;
import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.jetbrains.annotations.NotNull;

import static io.github.xenfork.acl.settings.MainSettings.acl;

public class Forge extends Basic {
@Override
public void apply(@NotNull Project target) {
super.apply(target);
if (acl.getFgv() == null) {
throw new RuntimeException("this forge version is null");
}
dependencies.add("forge", "net.minecraftforge:forge:" + acl.getFgv());
}
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
acl_test_version=1.0.51-SNAPSHOT
acl_version=1.1.3-SNAPSHOT
acl_version=1.1.5-SNAPSHOT


sts.projects=
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
<modelVersion>4.0.0</modelVersion>
<groupId>acl</groupId>
<artifactId>acl.gradle.plugin</artifactId>
<version>1.1.2-SNAPSHOT</version>
<version>1.1.4-SNAPSHOT</version>
<packaging>pom</packaging>
<dependencies>
<dependency>
<groupId>io.github.xenfork</groupId>
<artifactId>acl-core</artifactId>
<version>1.1.2-SNAPSHOT</version>
<version>1.1.4-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
94c6154061990247361ab7ec4262b015
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8bc850fe4bbe5a3aa6bf3327f0cef0b3b97da63e
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3a279c0eff3c9677e40044d2eeb097187d470edc221d76fd54763352822f2b27
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f72a6b322cf4de52d35243fa34504da566885552899281a71614107ef81af1e1c855a4b783c7b8a2bcd3c44a3990b3c4647c45b83f56b9d28171203c94e0e347
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
<groupId>acl</groupId>
<artifactId>acl.gradle.plugin</artifactId>
<versioning>
<lastUpdated>20240111025635</lastUpdated>
<lastUpdated>20240112053133</lastUpdated>
<snapshot>
<timestamp>20240111.025635</timestamp>
<timestamp>20240112.053133</timestamp>
<buildNumber>1</buildNumber>
</snapshot>
<snapshotVersions>
<snapshotVersion>
<extension>pom</extension>
<value>1.1.2-20240111.025635-1</value>
<updated>20240111025635</updated>
<value>1.1.4-20240112.053133-1</value>
<updated>20240112053133</updated>
</snapshotVersion>
</snapshotVersions>
</versioning>
<version>1.1.2-SNAPSHOT</version>
<version>1.1.4-SNAPSHOT</version>
</metadata>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
be0147e53b41c8307216c7a2fe919627
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6fcdea5e148e10867e590cec1c262acf85cf91e6
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2a9bf320df488ccd4c6e646848451034a7105d91e23b700167725f1350d3dd9b
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f8dea25e600cd1cf24d080045301d596ea3f81cbf8802116ee481f85ff2b15e42ad82220d00440457238b3b3c966dd93b199ef95172bfa8c2f0cc6666c6b7a37
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
<modelVersion>4.0.0</modelVersion>
<groupId>acl</groupId>
<artifactId>acl.gradle.plugin</artifactId>
<version>1.1.3-SNAPSHOT</version>
<version>1.1.5-SNAPSHOT</version>
<packaging>pom</packaging>
<dependencies>
<dependency>
<groupId>io.github.xenfork</groupId>
<artifactId>acl-core</artifactId>
<version>1.1.3-SNAPSHOT</version>
<version>1.1.5-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e3e0c40e0c9d659038b0c1f46e3a1cee
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f5b81b880b5fe3b299b8cbf1b29c9d2405bdd7d7
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8832c45a2d8e40a3a6428bf060743c183f0b54f1e10d4a3cae8eeeb4d5ce33cc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6c686e3373ae5c0fde90f148b2f823e77786897ab176fe08e2ca821265a5b8420cf6733859eceb1aa145ebe8f62a49c494fc9de67fed6bbb31ed7292c6491045
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
<groupId>acl</groupId>
<artifactId>acl.gradle.plugin</artifactId>
<versioning>
<lastUpdated>20240111030401</lastUpdated>
<lastUpdated>20240112073446</lastUpdated>
<snapshot>
<timestamp>20240111.030401</timestamp>
<timestamp>20240112.073446</timestamp>
<buildNumber>1</buildNumber>
</snapshot>
<snapshotVersions>
<snapshotVersion>
<extension>pom</extension>
<value>1.1.3-20240111.030401-1</value>
<updated>20240111030401</updated>
<value>1.1.5-20240112.073446-1</value>
<updated>20240112073446</updated>
</snapshotVersion>
</snapshotVersions>
</versioning>
<version>1.1.3-SNAPSHOT</version>
<version>1.1.5-SNAPSHOT</version>
</metadata>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
17e5fb700d0d072f1e45ee0c03433389
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d2be6cd8f71c4333b250a520ea4153ed0463a47a
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4e08637abfae19017a18bd5f0efdd9b45440963f52acdff9074ac4a2d95b46f7
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
96a518c1fce253c4413fe58fb266035ffef81335c1b06825641d21623e4c4ef6c8fe604753d8605a8e423e15d5415014efb228b8a70968f9626b64a3f7e0983f
8 changes: 4 additions & 4 deletions rootmaven/acl/acl.gradle.plugin/maven-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<groupId>acl</groupId>
<artifactId>acl.gradle.plugin</artifactId>
<versioning>
<latest>1.1.3-SNAPSHOT</latest>
<latest>1.1.5-SNAPSHOT</latest>
<versions>
<version>1.1.2-SNAPSHOT</version>
<version>1.1.3-SNAPSHOT</version>
<version>1.1.4-SNAPSHOT</version>
<version>1.1.5-SNAPSHOT</version>
</versions>
<lastUpdated>20240111030409</lastUpdated>
<lastUpdated>20240112073458</lastUpdated>
</versioning>
</metadata>
2 changes: 1 addition & 1 deletion rootmaven/acl/acl.gradle.plugin/maven-metadata.xml.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0acaf68ea1de299554395c966685ba15
c9772b81a5dcad4b11c4f5c9d6c79ccc
2 changes: 1 addition & 1 deletion rootmaven/acl/acl.gradle.plugin/maven-metadata.xml.sha1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6023d9e530c900c7c3aec96c0cd30388284f0a98
3076e843096188dd780d1e7a07422f7e6b8811af
2 changes: 1 addition & 1 deletion rootmaven/acl/acl.gradle.plugin/maven-metadata.xml.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d21a17761130fafc97c1225f3e088e0da00fa9a9455c92107c21aae499150693
c99633f7121798c939b2d81c838b8c745e460cb177e7c6f484a54167a7791c5f
2 changes: 1 addition & 1 deletion rootmaven/acl/acl.gradle.plugin/maven-metadata.xml.sha512
Original file line number Diff line number Diff line change
@@ -1 +1 @@
81b94896408acbf3562d115de96232244bd4c95c79c43d34b956f0a7be29bc64b5213b395774b3d7aa43c5978459b6c25988b007ef06ba789c3295fed937f3ea
77c1c3eb00642d413f41d549af9e8357d349e7b6cd2969e14a590f4f07072f4a2960d620f6187d6660e6961b39aa5acaecae134a65be8eedda058e374b5712df

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 394c9d0

Please sign in to comment.