forked from bobbylight/RSyntaxTextArea
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
102 lines (94 loc) · 2.54 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
['java', 'distribution', 'maven', 'signing'].each { apply plugin: it }
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.+'
}
// Regenerate local gradlew
task wrapper(type: Wrapper) {
gradleVersion = '2.0'
}
compileJava {
sourceCompatibility javaVersion
targetCompatibility javaVersion
options.debug = true
options.debugOptions.debugLevel = 'source,vars,lines'
// Most folks will compile with the latest JDK available, but official builds
// use a Java 5 JDK. Add this property to gradle.properties for boot classpath
if (project.hasProperty('java5CompileBootClasspath')) {
if (new File(java5CompileBootClasspath).isFile()) {
println "Bootstrap classpath when compiling Java: ${java5CompileBootClasspath}"
options.bootClasspath = java5CompileBootClasspath
}
else {
println "Warning: Specified java5CompileBootClasspath does not exist: ${java5CompileBootClasspath}"
}
}
options.compilerArgs << "-Xlint:deprecation"
}
ext.sharedManifest = manifest {
attributes('Specification-Title': 'RSyntaxTextArea',
'Specification-Version': version,
'Implementation-Title': 'org.fife.ui',
'Implementation-Version': version)
}
jar {
manifest { from sharedManifest }
}
// We use "distributions" to create the zip files uploaded to SourceForge
distributions {
main {
baseName = 'rsyntaxtextarea'
contents {
from { [ 'build/libs', 'distfiles' ] }
rename 'RSyntaxTextArea-.*\\.jar', 'rsyntaxtextarea.jar'
}
}
src {
baseName = 'rsyntaxtextarea'
}
}
distZip.classifier = null
distZip.dependsOn jar
srcDistZip.classifier = 'src'
srcDistZip {
from projectDir
include 'src/**/*'
include 'build.gradle'
include '.classpath'
include '.project'
include 'gradle.properties'
include 'README.md'
include '.settings/**'
}
task buildSourceForgeZips << {
println "Building zip files for SourceForge"
}
buildSourceForgeZips.dependsOn clean, jar, distZip, srcDistZip
// Stuff to generate and upload Maven artifacts
task javadocJar (type: Jar, dependsOn: javadoc) {
manifest { from sharedManifest }
classifier = 'javadoc'
from javadoc.destinationDir
}
task sourceJar (type: Jar) {
manifest { from sharedManifest }
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives jar, javadocJar, sourceJar
}
signing {
sign configurations.archives
}
repositories {
mavenCentral()
}
uploadArchives {
repositories {
mavenDeployer {
repository(url: 'file:///' + projectDir + '/../localMavenRepo')
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
pom.groupId = 'com.fifesoft'
}
}
}