@@ -10,13 +10,19 @@ buildscript {
1010 classpath ' net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
1111 }
1212}
13+
14+ plugins {
15+ id " com.jfrog.bintray" version " 1.7.3"
16+ }
17+
1318apply plugin : ' net.minecraftforge.gradle.forge'
19+ apply plugin : ' maven-publish'
1420
1521ext. config = parseConfig(file(' build.properties' ))
1622
17- ext. stModVersion = " ${ config.version.stellarapi.major} .${ config.version.stellarapi.minor} .${ config.version.stellarapi.revis} .${ config.version.stellarapi.patch} "
23+ ext. modversion = " ${ config.version.stellarapi.major} .${ config.version.stellarapi.minor} .${ config.version.stellarapi.revis} .${ config.version.stellarapi.patch} "
1824
19- version = " ${ config.version.minecraft} -${ stModVersion } "
25+ version = " ${ config.version.minecraft} -${ modversion } "
2026
2127group= " ${ config.group} "
2228archivesBaseName = " ${ config.archive} "
@@ -31,21 +37,45 @@ minecraft {
3137
3238
3339dependencies {
34- // you may put jars on which you depend on in ./libs
35- // or you may define them like so..
36- // compile "some.group:artifact:version:classifier"
37- // compile "some.group:artifact:version"
38-
39- // real examples
40- // compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
41- // compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
42-
43- // for more info...
44- // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
45- // http://www.gradle.org/docs/current/userguide/dependency_management.html
4640
4741}
4842
43+
44+ rootProject. tasks. getByName(' build' ). dependsOn bintrayUpload
45+
46+ publishing {
47+ publications {
48+ MavenJar (MavenPublication ) {
49+ from components. java
50+ artifact sourceJar
51+ groupId " ${ config.group} "
52+ artifactId " ${ config.artifact} "
53+ version " ${ config.version.minecraft} -${ modversion} "
54+ }
55+ }
56+ }
57+
58+ bintray {
59+ user = System . getenv(' BINTRAY_USER' )
60+ key = System . getenv(' BINTRAY_KEY' )
61+ dryRun = true
62+ publish = true
63+ pkg {
64+ repo = ' StellarMods'
65+ name = ' stellarapi'
66+ licenses = [' MIT' ]
67+ websiteUrl = ' https://github.com/Abastro/StellarAPI'
68+ issueTrackerUrl = ' https://github.com/Abastro/StellarAPI/issues'
69+ vcsUrl = ' https://github.com/Abastro/StellarAPI.git'
70+ version {
71+ name = " ${ config.version.minecraft} -${ modversion} "
72+ }
73+ }
74+ publications = [' MavenJar' ]
75+ }
76+
77+
78+
4979task deobfJar (type : Jar ) {
5080 from sourceSets. main. output
5181 classifier = ' deobf'
0 commit comments