forked from SnippingToolPlusPlus/SnippingToolPlusPlus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
115 lines (97 loc) · 2.76 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
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'jacoco'
apply plugin: 'sonar-runner'
apply plugin: 'launch4j'
project.sourceCompatibility = 1.7
project.targetCompatibility = 1.7
project.version = '6.4.5'
project.ext {
mainClass = 'com.shaneisrael.st.SnippingToolPlusPlus'
}
repositories {
mavenCentral()
mavenLocal()
maven {
url 'http://ci.snippingtoolpluspl.us/repository/'
}
}
jar {
from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}
manifest {
attributes ('Main-Class': project.ext.mainClass,
'Application-Version': project.version,
'Author': 'http://snippingtoolpluspl.us',
'Built-By': System.getProperty("user.name"),
'Built-On': new Date().toString())
}
archiveName = project.name + '-' + project.version + '.jar'
}
launch4j {
chdir = 'launch4j/launch4j-3.2-win32'
icon = '../../launch4j/icon.ico'
jar = '../../build/libs/' + project.name + '-' + project.version + '.jar'
outfile = '../libs/' + project.name + '-' + project.version + '.exe'
mainClassName = project.ext.mainClass
}
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'edu.sc.seis.gradle:launch4j:1.0.6'
classpath 'mysql:mysql-connector-java:5.1.34'
classpath 'net.java.dev.jna:jna:4.1.0'
classpath 'net.java.dev.jna:jna-platform:4.1.0'
}
}
dependencies {
testCompile 'junit:junit:4.11'
compile 'com.miglayout:miglayout:3.7.4' //bsd
compile 'com.google.code.gson:gson:2.2.4' //apache v2
compile 'mysql:mysql-connector-java:5.1.34'
compile 'net.java.dev.jna:jna:4.1.0'
compile 'net.java.dev.jna:jna-platform:4.1.0'
}
eclipse {
project {
name = 'snippingtoolplusplus'
}
}
test {
systemProperties 'property': 'value'
}
jacoco {
toolVersion = '0.7.0.201403182114'
}
jacocoTestReport {
additionalSourceDirs = files("src/main/java")
reports {
xml.enabled true
xml.destination "${buildDir}/reports/xmlunittest"
csv.enabled false
html.destination "${buildDir}/reports/coverage"
}
}
uploadArchives {
repositories {
flatDir {
dirs 'repos'
}
}
}
//run gradlew wrapper to update the project's gradle version
task wrapper(type: Wrapper) {
gradleVersion = '1.12'
}
sonarRunner {
sonarProperties {
property "sonar.host.url", "http://sonar.snippingtoolpluspl.us"
property "sonar.jdbc.url", "jdbc:mysql://localhost:3306/sonar"
property "sonar.jdbc.driverClassName", "com.mysql.jdbc.Driver"
property "sonar.jdbc.username", "sonar"
property "sonar.jdbc.password", "$System.env.SONAR_PASSWORD"
}
}