Skip to content

Commit a064d01

Browse files
committed
Set up bintray for upload.
1 parent 5b49fde commit a064d01

File tree

2 files changed

+45
-14
lines changed

2 files changed

+45
-14
lines changed

build.gradle

Lines changed: 44 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
1318
apply plugin: 'net.minecraftforge.gradle.forge'
19+
apply plugin: 'maven-publish'
1420

1521
ext.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

2127
group= "${config.group}"
2228
archivesBaseName = "${config.archive}"
@@ -31,21 +37,45 @@ minecraft {
3137

3238

3339
dependencies {
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+
4979
task deobfJar(type: Jar) {
5080
from sourceSets.main.output
5181
classifier = 'deobf'

build.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
group = stellarapi.api
2+
artifact = stellarapi
23
archive = Stellar API
34

45
version.stellarapi.major = 0

0 commit comments

Comments
 (0)