Skip to content

Commit

Permalink
Prepare for stonecutter
Browse files Browse the repository at this point in the history
  • Loading branch information
IMB11 committed Jun 29, 2024
1 parent 3980a37 commit 32ad6cc
Show file tree
Hide file tree
Showing 63 changed files with 584 additions and 946 deletions.
24 changes: 9 additions & 15 deletions HEADER
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
ALL RIGHTS RESERVED

Copyright (C) ${YEAR} Calum (mineblock11), enjarai
Copyright (c) 2024 Calum H. (IMB11) and enjarai

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA
THE SOFTWARE IS PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
69 changes: 29 additions & 40 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
plugins {
id 'fabric-loom' version '1.6-SNAPSHOT'
id 'fabric-loom' version '1.7-SNAPSHOT'
id 'maven-publish'
id 'me.fallenbreath.yamlang' version '1.3.0'
id "org.quiltmc.gradle.licenser" version "2.0.1"
}

version = project.mod_version
group = project.maven_group
version = property("mod.version") + "+" + "1.20.1"
group = "dev.imb11"

base {
archivesName = property("mod.name")
}

license {
rule file("./HEADER")
Expand Down Expand Up @@ -43,6 +47,15 @@ repositories {
}
}

//if (stonecutter.current.active) { // run configs for non-active version would be invalid
// loom {
// runConfigs.all {
// ideConfigGenerated = true // generate IDE tasks for running client, server and testmod, datagen if those are present
// runDir "../../run" // use a global run directory for all versions
// }
// }
//}

loom {
accessWidenerPath = file("src/main/resources/skinshuffle.accesswidener")
}
Expand All @@ -54,72 +67,48 @@ yamlang {

dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
mappings "net.fabricmc:yarn:${project.'deps.yarn'}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.'deps.loader'}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.'deps.fabric_api'}"

modLocalRuntime modCompileOnly("com.terraformersmc:modmenu:${project.modmenu_version}")
modLocalRuntime modCompileOnly("com.terraformersmc:modmenu:${project.'runtime.modmenu'}")

// modImplementation "com.ptsmods:devlogin:3.5"
include implementation('com.konghq:unirest-java:3.11.09:standalone')

include modImplementation("dev.lambdaurora:spruceui:${project.spruceui_version}")
include modImplementation("dev.lambdaurora:spruceui:${project.'deps.spruceui'}")
include modImplementation("maven.modrinth:cicada:0.8.1+1.20.1")
include modImplementation("dev.isxander:yet-another-config-lib:${project.yacl_version}")

include implementation("org.jsoup:jsoup:${project.jsoup_version}")
include implementation("org.jsoup:jsoup:${project.'deps.jsoup'}")
include implementation("org.mineskin:java-client:+")
include implementation("commons-validator:commons-validator:1.7")



modRuntimeOnly("me.djtheredstoner:DevAuth-fabric:1.2.0")

// FancyMenu testing.
// modImplementation "curse.maven:konkrete-fabric-416797:4581979"
// modImplementation "curse.maven:fancymenu-fabric-416796:4584010"
}

processResources {
inputs.property "version", project.version
inputs.property "minecraft_version", project.minecraft_version
inputs.property "loader_version", project.loader_version
inputs.property "loader_version", project.'deps.loader'
filteringCharset "UTF-8"

filesMatching("fabric.mod.json") {
expand "version": project.version,
"minecraft_version": project.minecraft_version,
"loader_version": project.loader_version
}
}

def targetJavaVersion = 17
tasks.withType(JavaCompile).configureEach {
// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
// If Javadoc is generated, this must be specified in that task too.
it.options.encoding = "UTF-8"
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
it.options.release = targetJavaVersion
"loader_version": project.'deps.loader'
}
}

java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
archivesBaseName = project.archives_base_name
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()
var version = JavaVersion.VERSION_17

sourceCompatibility = version
targetCompatibility = version
}

jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}" }
rename { "${it}_${project.base.archivesName.get()}"}
}
}

Expand Down
19 changes: 9 additions & 10 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@ org.gradle.jvmargs=-Xmx4G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.20.1
yarn_mappings=1.20.1+build.10
loader_version=0.15.11
deps.yarn=1.20.1+build.10
deps.loader=0.15.11
# Mod Properties
mod_version=2.0.0+1.20.1
maven_group=com.mineblock11
archives_base_name=SkinShuffle
mod.version=2.0.0+1.20.1
mod.name=SkinShuffle
# Dependencies
# check this on https://modmuss50.me/fabric.html
fabric_version=0.92.2+1.20.1
spruceui_version=5.0.0+1.20
jsoup_version=1.16.1
cvurlio_version=1.5.1
modmenu_version=7.2.2
deps.fabric_api=0.92.2+1.20.1
deps.spruceui=5.0.0+1.20
deps.jsoup=1.16.1
deps.cvurlio=1.5.1
runtime.modmenu=7.2.2
yacl_version=3.5.0+1.20.1-fabric
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
24 changes: 9 additions & 15 deletions src/main/java/com/mineblock11/skinshuffle/SkinShuffle.java
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
/*
* ALL RIGHTS RESERVED
*
* Copyright (C) 2023 Calum (mineblock11), enjarai
* Copyright (c) 2024 Calum H. (IMB11) and enjarai
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA
* THE SOFTWARE IS PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

package com.mineblock11.skinshuffle;
Expand Down
26 changes: 9 additions & 17 deletions src/main/java/com/mineblock11/skinshuffle/api/SkinAPIs.java
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
/*
* ALL RIGHTS RESERVED
*
* Copyright (C) 2023 Calum (mineblock11), enjarai
* Copyright (c) 2024 Calum H. (IMB11) and enjarai
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA
* THE SOFTWARE IS PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

package com.mineblock11.skinshuffle.api;
Expand All @@ -32,7 +26,6 @@
import com.mineblock11.skinshuffle.util.SkinCacheRegistry;
import com.mojang.authlib.minecraft.UserApiService;
import com.mojang.authlib.yggdrasil.YggdrasilUserApiService;
import com.mojang.util.UUIDTypeAdapter;
import kong.unirest.HttpResponse;
import kong.unirest.Unirest;
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking;
Expand All @@ -45,7 +38,6 @@
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.Base64;
import java.util.Objects;
import java.util.Optional;
import java.util.UUID;

Expand Down
24 changes: 9 additions & 15 deletions src/main/java/com/mineblock11/skinshuffle/api/SkinQueryResult.java
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
/*
* ALL RIGHTS RESERVED
*
* Copyright (C) 2023 Calum (mineblock11), enjarai
* Copyright (c) 2024 Calum H. (IMB11) and enjarai
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA
* THE SOFTWARE IS PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

package com.mineblock11.skinshuffle.api;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
/*
* ALL RIGHTS RESERVED
*
* Copyright (C) 2023 Calum (mineblock11), enjarai
* Copyright (c) 2024 Calum H. (IMB11) and enjarai
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA
* THE SOFTWARE IS PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

package com.mineblock11.skinshuffle.client;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
/*
* ALL RIGHTS RESERVED
*
* Copyright (C) 2023 Calum (mineblock11), enjarai
* Copyright (c) 2024 Calum H. (IMB11) and enjarai
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA
* THE SOFTWARE IS PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

package com.mineblock11.skinshuffle.client.config;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
/*
* ALL RIGHTS RESERVED
*
* Copyright (C) 2023 Calum (mineblock11), enjarai
* Copyright (c) 2024 Calum H. (IMB11) and enjarai
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA
* THE SOFTWARE IS PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

package com.mineblock11.skinshuffle.client.config;
Expand Down
Loading

0 comments on commit 32ad6cc

Please sign in to comment.