Browse Source

Update loom and publish sources to maven

Unknown 5 years ago
parent
commit
7ecc287d71
2 changed files with 16 additions and 7 deletions
  1. 15 6
      build.gradle
  2. 1 1
      gradle.properties

+ 15 - 6
build.gradle

@@ -1,5 +1,5 @@
 plugins {
-    id 'fabric-loom' version '0.2.4-SNAPSHOT'
+    id 'fabric-loom' version '0.2.5-SNAPSHOT'
     id 'maven-publish'
     id 'net.minecrell.licenser' version '0.4.1'
 }
@@ -42,13 +42,17 @@ dependencies {
     mappings "net.fabricmc:yarn:${project.yarn_version}"
     modApi "net.fabricmc:fabric-loader:${project.fabricloader_version}"
     modApi "net.fabricmc.fabric-api:fabric-api:${project.fabric_api}"
-    modApi "cloth:ClothEvents:${cloth_events_version}"
+    modApi("me.shedaniel.cloth:cloth-events:${cloth_events_version}") {
+        transitive = false
+    }
     modImplementation("me.shedaniel.cloth:config-2:${cloth_config_version}") {
         transitive = false
     }
     modApi "blue.endless:jankson:${project.jankson_version}"
     if (includeDep) {
-        include "cloth:ClothEvents:${cloth_events_version}"
+        include("me.shedaniel.cloth:cloth-events:${cloth_events_version}") {
+            transitive = false
+        }
         include("me.shedaniel.cloth:config-2:${cloth_config_version}") {
             transitive = false
         }
@@ -59,14 +63,19 @@ dependencies {
     compileOnly "com.google.code.findbugs:jsr305:3.0.2"
 }
 
+task sourcesJar(type: Jar, dependsOn: classes) {
+    classifier = "sources"
+    from sourceSets.main.allSource
+}
+
 publishing {
     publications {
         mavenJava(MavenPublication) {
-            artifact(file("${project.buildDir}/libs/${archivesBaseName}-${version}.jar")) {
+            artifact(remapJar) {
                 builtBy remapJar
             }
-            artifact(jar) {
-                builtBy jar
+            artifact(sourcesJar) {
+                builtBy remapSourcesJar
             }
         }
     }

+ 1 - 1
gradle.properties

@@ -3,7 +3,7 @@ minecraft_version=1.14.3
 yarn_version=1.14.3+build.1
 fabricloader_version=0.4.8+build.155
 jankson_version=1.1.0
-cloth_events_version=0.3.1.23
+cloth_events_version=0.4.0
 cloth_config_version=0.5.0
 modmenu_version=1.5.4-85
 fabric_api=0.3.0+build.198