summaryrefslogtreecommitdiff
path: root/build.gradle
diff options
context:
space:
mode:
Diffstat (limited to 'build.gradle')
-rw-r--r--build.gradle23
1 files changed, 23 insertions, 0 deletions
diff --git a/build.gradle b/build.gradle
index 2b334b1..f693e19 100644
--- a/build.gradle
+++ b/build.gradle
@@ -11,6 +11,7 @@ buildscript {
apply plugin: 'net.minecraftforge.gradle'
// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
apply plugin: 'eclipse'
+apply plugin: 'maven-publish'
version = '1.0'
group = 'com.yourname.modid' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
@@ -105,4 +106,26 @@ jar {
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
+}
+
+// Example configuration to allow publishing using the maven-publish task
+// we define a custom artifact that is sourced from the reobfJar output task
+// and then declare that to be published
+// Note you'll need to add a repository here
+def reobfFile = file("$buildDir/reobfJar/output.jar")
+def reobfArtifact = artifacts.add('default', reobfFile) {
+ type 'jar'
+ builtBy 'reobfJar'
+}
+publishing {
+ publications {
+ mavenJava(MavenPublication) {
+ artifact reobfArtifact
+ }
+ }
+ repositories {
+ maven {
+ url "file:///${project.projectDir}/mcmodsrepo"
+ }
+ }
} \ No newline at end of file