From 0de1bebbdc3e4d2e3c13d371484a2b90a844e5a1 Mon Sep 17 00:00:00 2001 From: Ennui Langeweile <85590273+EnnuiL@users.noreply.github.com> Date: Wed, 21 Jul 2021 21:40:34 -0300 Subject: [PATCH] 0.2.2 | The Maven Central Update a.k.a. Javadoc the Dork IV: The HTML Partnership --- .github/workflows/gradlepublish.yml | 13 +++---- README.md | 2 +- build.gradle | 45 +++++++++++++++++------- gradle.properties | 10 +++--- gradle/wrapper/gradle-wrapper.properties | 2 +- settings.gradle | 2 ++ 6 files changed, 48 insertions(+), 26 deletions(-) diff --git a/.github/workflows/gradlepublish.yml b/.github/workflows/gradlepublish.yml index ca99660..4581386 100644 --- a/.github/workflows/gradlepublish.yml +++ b/.github/workflows/gradlepublish.yml @@ -1,5 +1,4 @@ name: Build Mod - on: push jobs: @@ -7,15 +6,17 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up JDK 16 - uses: actions/setup-java@v1 + - name: Checkout + uses: actions/checkout@v2 + - name: Set up AdoptOpenJDK 16 + uses: actions/setup-java@v2 with: - java-version: 16 + distribution: 'adopt' + java-version: '16' - name: Build with Gradle run: gradle build - name: Upload build artifacts - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v2 with: name: build-artifacts path: build/libs diff --git a/README.md b/README.md index c274d52..33c917b 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ A library that allows other mods to create zooms and custom spyglasses easily. T **WARNING:** This API is still not finished and breaking changes may happen until a 1.0.0 release happens! -Currently, this library is only available in a Maven repository through Jitpack, however, we have plans to host it on Maven Central. If none of these options work, consider using local Maven on the source code of a released version. +This library is available through Maven Central and Jitpack. If none of these options work, consider using local Maven on the source code of a released version. LibZoomer provides zooming through zoom instances, which contains three sub-instances: transition modes, mouse modifiers and zoom overlays. A zoom instance can be created with different subinstances, which can be either provided by the library or implemented by the mod itself. In order to a zoom instance to be functional, it must be registered by the ZoomRegistry. In order to make the instance zoom in, the instance's zoom state must be set to true, which can be done using the `setZoom` method, the vice-versa can be done by setting it to false. diff --git a/build.gradle b/build.gradle index 26b921d..4cc42c1 100644 --- a/build.gradle +++ b/build.gradle @@ -1,21 +1,20 @@ plugins { id 'fabric-loom' version '0.9-SNAPSHOT' - id 'io.github.juuxel.loom-quiltflower' version '1.1.2' + // id 'io.github.juuxel.loom-quiltflower' version '1.1.2' id 'maven-publish' } +// Visual Studio Code completely ignores options.release. +// So, we still have those two. sourceCompatibility = JavaVersion.VERSION_16 targetCompatibility = JavaVersion.VERSION_16 archivesBaseName = project.archives_base_name +version = System.env.GITHUB_ACTIONS == "true" + ? "${project.mod_version}.github.${System.env.GITHUB_RUN_NUMBER}" + : project.mod_version group = project.maven_group -if (System.env.GITHUB_ACTIONS == "true") { - version = "${project.mod_version}-github.${System.env.GITHUB_RUN_NUMBER}" -} else { - version = project.mod_version -} - sourceSets { testmod { compileClasspath += main.compileClasspath @@ -23,15 +22,10 @@ sourceSets { } } -repositories { - maven { url "https://maven.quiltmc.org/repository/release" } - mavenCentral() -} - dependencies { // To change the versions, see the gradle.properties file minecraft "com.mojang:minecraft:${project.minecraft_version}" - mappings "org.quiltmc:yarn:${project.yarn_mappings}:v2" + 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}" @@ -64,6 +58,7 @@ java { // 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. + withJavadocJar() withSourcesJar() } @@ -79,9 +74,33 @@ publishing { artifact(remapJar) { builtBy remapJar } + artifact(javadocJar) {} artifact(sourcesJar) { builtBy remapSourcesJar } + + pom { + name = 'LibZoomer' + description = 'A library that allows other Minecraft mods to have powerful zooming easily.' + url = 'https://github.com/EnnuiL/LibZoomer' + licenses { + license { + name = 'The MIT License' + url = 'https://opensource.org/licenses/MIT' + } + } + developers { + developer { + id = 'EnnuiL' + name = 'Ennui Langeweile' + } + } + scm { + connection = 'scm:git:https://github.com/EnnuiL/LibZoomer.git' + developerConnection = 'scm:git:git@github.com:EnnuiL/LibZoomer.git' + url = 'https://github.com/EnnuiL/LibZoomer' + } + } } } diff --git a/gradle.properties b/gradle.properties index 47c4b84..d26e266 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,15 +1,15 @@ # Done to increase the memory available to gradle. -org.gradle.jvmargs = -Xmx1G +org.gradle.jvmargs = -XX:+UseZGC -Xmx1G # Fabric Properties, check these on https://fabricmc.net/versions.html -minecraft_version = 1.17 -yarn_mappings = 1.17+build.13 +minecraft_version = 1.17.1 +yarn_mappings = 1.17.1+build.24 loader_version = 0.11.6 # Mod Properties -mod_version = 0.2.1+1.17 +mod_version = 0.2.2+1.17.1 maven_group = io.github.ennuil archives_base_name = libzoomer # Dependencies -fabric_version = 0.35.2+1.17 \ No newline at end of file +fabric_version = 0.37.0+1.17 \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 69a9715..05679dc 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/settings.gradle b/settings.gradle index 0c106cf..6217270 100644 --- a/settings.gradle +++ b/settings.gradle @@ -5,10 +5,12 @@ pluginManagement { name = 'Fabric' url = 'https://maven.fabricmc.net/' } + /* maven { name = 'Cotton' url = 'https://server.bbkr.space/artifactory/libs-release/' } + */ gradlePluginPortal() } }