forked from jMonkeyEngine-Contributions/Lemur
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
127 lines (101 loc) · 3.44 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
buildscript {
repositories {
jcenter()
}
dependencies {
// This sucks down a lot of stuff that 'normal' users wouldn't
// have and won't need anyway.
if( project.hasProperty('releaseUser') ) {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6'
}
}
}
apply plugin: 'java'
version='1.8.1'
ext.jmeVersion='[3.1,)' // but must be alpha4 or better
//ext.jmeVersion='unknown'
ext {
bintrayLabels = ['jMonkeyEngine', 'gamedev', 'GUI']
releaseDescription = "Lemur ${project.version}"
releaseVcsTag = "v${project.version}"
}
repositories {
mavenLocal()
jcenter()
}
dependencies {
compile "org.jmonkeyengine:jme3-core:$jmeVersion"
compile 'com.google.guava:guava:19.0'
compile 'org.slf4j:slf4j-api:1.7.13'
}
compileJava.doLast {
def buildDate = new Date().format('yyyyMMdd')
println "Writing lemur.build.date:" + buildDate
new File(destinationDir, 'lemur.build.date').text = buildDate
}
// Common configuration for the root and all 'real' children.
// The plan is to just keep maven-repo publishing related stuff
// here so that the other build files can look as close to
// regular java builds as possible.
configure(allprojects.findAll {it.name != 'extensions'}) {
apply plugin: 'maven' // for installing to maven local
// Common group ID for all projects here
group='com.simsilica'
ext {
websiteUrl = 'https://github.com/jMonkeyEngine-Contributions/Lemur'
vcsUrl = 'https://github.com/jMonkeyEngine-Contributions/Lemur.git'
githubRepo = 'jMonkeyEngine-Contributions/Lemur'
issueTrackerUrl = 'https://github.com/jMonkeyEngine-Contributions/Lemur/issues'
}
// One non-maven thing in this block to keep us honest with respect to
// imports
configurations {
compile.transitive = false
}
// Centralizing this bintray reference here so it's easier to
// remove when JME is in jcenter().
repositories {
// Temporary until JME jars are in jcenter()
//maven { url "http://dl.bintray.com/jmonkeyengine/org.jmonkeyengine" }
jcenter()
}
/*
// Configuration to produce maven-repo style -sources and -javadoc jars
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
*/
}
// *** For some reason, this can't be injected from the root project
// or it picks up the root project sources instead of the subproject
// and doesn't even produce main jars.
// Configuration to produce maven-repo style -sources and -javadoc jars
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
exclude '**/.backups'
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
// Put this at the end or it won't pick up the project.version and stuff
// ...thus it also can't be injected. But that means we can also be selective
// about the sub-projects that we release.
if( project.hasProperty('releaseUser') ) {
apply plugin: 'com.jfrog.bintray'
apply from: 'https://raw.githubusercontent.com/Simsilica/gradle-plugins/master/simtools-release.gradle'
}