Add Maven publishing
This commit is contained in:
		
							parent
							
								
									9053da9529
								
							
						
					
					
						commit
						03c4663a35
					
				@ -63,32 +63,24 @@ tasks {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	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.
 | 
					 | 
				
			||||||
		withSourcesJar()
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	jar {
 | 
						jar {
 | 
				
			||||||
		from("LICENSE") {
 | 
							from("LICENSE") {
 | 
				
			||||||
			rename { "${it}_${archives_base_name}" }
 | 
								rename { "${it}_${archives_base_name}" }
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						val sourcesJar by creating(Jar::class) {
 | 
				
			||||||
 | 
							dependsOn(JavaPlugin.CLASSES_TASK_NAME)
 | 
				
			||||||
 | 
							archiveClassifier.convention("sources")
 | 
				
			||||||
 | 
							from(sourceSets["main"].allSource)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					 | 
				
			||||||
// configure the maven publication
 | 
					 | 
				
			||||||
	publishing {
 | 
						publishing {
 | 
				
			||||||
		publications {
 | 
							publications {
 | 
				
			||||||
		mavenJava(MavenPublication) {
 | 
								create<MavenPublication>("maven") {
 | 
				
			||||||
				// add all the jars that should be included when publishing to maven
 | 
									// add all the jars that should be included when publishing to maven
 | 
				
			||||||
			artifact(remapJar) {
 | 
									artifact(remapJar.get())
 | 
				
			||||||
				dependsOn(remapJar)
 | 
									artifact(sourcesJar)
 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			artifact(sourcesJar) {
 | 
					 | 
				
			||||||
				dependsOn(remapSourcesJar)
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -100,4 +92,4 @@ publishing {
 | 
				
			|||||||
			// retrieving dependencies.
 | 
								// retrieving dependencies.
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 */
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user