mirror of
				https://github.com/SquidDev-CC/CC-Tweaked
				synced 2025-10-31 21:52:59 +00:00 
			
		
		
		
	Switch to using maven-publish
The old maven package is removed in Gradle 7.0. Instead, we publish to squiddev.cc using WebDAV (ewww).
This commit is contained in:
		
							
								
								
									
										87
									
								
								build.gradle
									
									
									
									
									
								
							
							
						
						
									
										87
									
								
								build.gradle
									
									
									
									
									
								
							| @@ -17,6 +17,7 @@ buildscript { | |||||||
| plugins { | plugins { | ||||||
|     id "checkstyle" |     id "checkstyle" | ||||||
|     id "jacoco" |     id "jacoco" | ||||||
|  |     id "maven-publish" | ||||||
|     id "com.github.hierynomus.license" version "0.15.0" |     id "com.github.hierynomus.license" version "0.15.0" | ||||||
|     id "com.matthewprenger.cursegradle" version "1.4.0" |     id "com.matthewprenger.cursegradle" version "1.4.0" | ||||||
|     id "com.github.breadmoirai.github-release" version "2.2.12" |     id "com.github.breadmoirai.github-release" version "2.2.12" | ||||||
| @@ -24,8 +25,6 @@ plugins { | |||||||
| } | } | ||||||
|  |  | ||||||
| apply plugin: 'net.minecraftforge.gradle' | apply plugin: 'net.minecraftforge.gradle' | ||||||
| apply plugin: 'maven-publish' |  | ||||||
| apply plugin: 'maven' |  | ||||||
|  |  | ||||||
| version = mod_version | version = mod_version | ||||||
|  |  | ||||||
| @@ -36,6 +35,9 @@ java { | |||||||
|     toolchain { |     toolchain { | ||||||
|         languageVersion = JavaLanguageVersion.of(8) |         languageVersion = JavaLanguageVersion.of(8) | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     withSourcesJar() | ||||||
|  |     withJavadocJar() | ||||||
| } | } | ||||||
|  |  | ||||||
| minecraft { | minecraft { | ||||||
| @@ -112,7 +114,6 @@ repositories { | |||||||
| configurations { | configurations { | ||||||
|     shade |     shade | ||||||
|     compile.extendsFrom shade |     compile.extendsFrom shade | ||||||
|     deployerJars |  | ||||||
|     cctJavadoc |     cctJavadoc | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -139,8 +140,6 @@ dependencies { | |||||||
|     testImplementation 'org.jetbrains.kotlin:kotlin-reflect:1.3.72' |     testImplementation 'org.jetbrains.kotlin:kotlin-reflect:1.3.72' | ||||||
|     testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8' |     testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8' | ||||||
|  |  | ||||||
|     deployerJars "org.apache.maven.wagon:wagon-ssh:3.0.0" |  | ||||||
|  |  | ||||||
|     cctJavadoc 'cc.tweaked:cct-javadoc:1.3.0' |     cctJavadoc 'cc.tweaked:cct-javadoc:1.3.0' | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -168,8 +167,6 @@ task luaJavadoc(type: Javadoc) { | |||||||
| } | } | ||||||
|  |  | ||||||
| jar { | jar { | ||||||
|     dependsOn javadoc |  | ||||||
|  |  | ||||||
|     manifest { |     manifest { | ||||||
|         attributes(["Specification-Title": "computercraft", |         attributes(["Specification-Title": "computercraft", | ||||||
|                     "Specification-Vendor": "SquidDev", |                     "Specification-Vendor": "SquidDev", | ||||||
| @@ -180,10 +177,6 @@ jar { | |||||||
|                     "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")]) |                     "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")]) | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     from (sourceSets.main.allSource) { |  | ||||||
|         include "dan200/computercraft/api/**/*.java" |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     from configurations.shade.collect { it.isDirectory() ? it : zipTree(it) } |     from configurations.shade.collect { it.isDirectory() ? it : zipTree(it) } | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -550,51 +543,41 @@ curseforge { | |||||||
|  |  | ||||||
| publishing { | publishing { | ||||||
|     publications { |     publications { | ||||||
|         mavenJava(MavenPublication) { |         maven(MavenPublication) { | ||||||
|             from components.java |             from components.java | ||||||
|             // artifact sourceJar |  | ||||||
|  |             pom { | ||||||
|  |                 name = 'CC: Tweaked' | ||||||
|  |                 description = 'CC: Tweaked is a fork of ComputerCraft, adding programmable computers, turtles and more to Minecraft.' | ||||||
|  |                 url = 'https://github.com/SquidDev-CC/CC-Tweaked' | ||||||
|  |  | ||||||
|  |                 scm { | ||||||
|  |                     url = 'https://github.com/SquidDev-CC/CC-Tweaked.git' | ||||||
|  |                 } | ||||||
|  |  | ||||||
|  |                 issueManagement { | ||||||
|  |                     system = 'github' | ||||||
|  |                     url = 'https://github.com/SquidDev-CC/CC-Tweaked/issues' | ||||||
|  |                 } | ||||||
|  |  | ||||||
|  |                 licenses { | ||||||
|  |                     license { | ||||||
|  |                         name = 'ComputerCraft Public License, Version 1.0' | ||||||
|  |                         url = 'https://github.com/SquidDev-CC/CC-Tweaked/blob/mc-1.15.x/LICENSE' | ||||||
|  |                     } | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| } |  | ||||||
|  |  | ||||||
| uploadArchives { |  | ||||||
|     repositories { |     repositories { | ||||||
|         if(project.hasProperty('mavenUploadUrl')) { |         if (project.hasProperty("mavenUser")) { | ||||||
|             mavenDeployer { |             maven { | ||||||
|                 configuration = configurations.deployerJars |                 name = "SquidDev" | ||||||
|  |                 url = "https://squiddev.cc/maven" | ||||||
|                 repository(url: project.property('mavenUploadUrl')) { |                 credentials { | ||||||
|                     authentication( |                     username = project.property("mavenUser") as String | ||||||
|                         userName: project.property('mavenUploadUser'), |                     password = project.property("mavenPass") as String | ||||||
|                         privateKey: project.property('mavenUploadKey')) |  | ||||||
|                 } |  | ||||||
|  |  | ||||||
|                 pom.project { |  | ||||||
|                     name 'CC: Tweaked' |  | ||||||
|                     packaging 'jar' |  | ||||||
|                     description 'CC: Tweaked is a fork of ComputerCraft, adding programmable computers, turtles and more to Minecraft.' |  | ||||||
|                     url 'https://github.com/SquidDev-CC/CC-Tweaked' |  | ||||||
|  |  | ||||||
|                     scm { |  | ||||||
|                         url 'https://github.com/SquidDev-CC/CC-Tweaked.git' |  | ||||||
|                     } |  | ||||||
|  |  | ||||||
|                     issueManagement { |  | ||||||
|                         system 'github' |  | ||||||
|                         url 'https://github.com/SquidDev-CC/CC-Tweaked/issues' |  | ||||||
|                     } |  | ||||||
|  |  | ||||||
|                     licenses { |  | ||||||
|                         license { |  | ||||||
|                             name 'ComputerCraft Public License, Version 1.0' |  | ||||||
|                             url 'https://github.com/SquidDev-CC/CC-Tweaked/blob/master/LICENSE' |  | ||||||
|                             distribution 'repo' |  | ||||||
|                         } |  | ||||||
|                     } |  | ||||||
|                 } |  | ||||||
|  |  | ||||||
|                 pom.whenConfigured { pom -> |  | ||||||
|                     pom.dependencies.clear() |  | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
| @@ -625,7 +608,7 @@ githubRelease { | |||||||
|     prerelease false |     prerelease false | ||||||
| } | } | ||||||
|  |  | ||||||
| def uploadTasks = ["uploadArchives", "curseforge", "githubRelease"] | def uploadTasks = ["publish", "curseforge", "githubRelease"] | ||||||
| uploadTasks.forEach { tasks.getByName(it).dependsOn checkRelease } | uploadTasks.forEach { tasks.getByName(it).dependsOn checkRelease } | ||||||
|  |  | ||||||
| task uploadAll(dependsOn: uploadTasks) { | task uploadAll(dependsOn: uploadTasks) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jonathan Coates
					Jonathan Coates