-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
196 lines (168 loc) · 5.25 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
import java.text.SimpleDateFormat
apply plugin: 'idea'
//and standard one
apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'maven-publish'
apply plugin: 'signing'
group = "com.github.dzmipt"
archivesBaseName = "kdbStudio"
version = "dz2.0"
compileJava {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
repositories {
mavenCentral()
}
configurations {
txtmark
}
dependencies {
txtmark group: 'com.github.rjeschke', name: 'txtmark', version: '0.13'
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.14.0'
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.14.0'
implementation group: 'org.apache.logging.log4j', name: 'log4j-iostreams', version: '2.14.0'
implementation group: 'com.fifesoft', name: 'rsyntaxtextarea', version: '3.1.3'
implementation group: 'org.jfree', name: 'jfreechart', version: '1.5.3'
implementation group: 'org.apache.poi', name: 'poi', version: '5.1.0'
implementation group: 'org.apache.poi', name: 'poi-ooxml', version: '5.1.0'
implementation group: 'org.drjekyll', name: 'fontchooser', version: '2.4'
implementation group: 'net.java.dev.jna', name: 'jna', version: '5.10.0'
runtimeOnly files ('lib/images.jar')
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.3.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.1'
}
sourceSets {
main {
java {
srcDirs 'src'
}
resources {
srcDirs 'src','images'
include 'log4j2.xml'
include 'studio*.properties'
include 'org/netbeans/editor/Bundle*.properties'
include '*.png'
include 'notes.html'
include 'build.txt'
}
}
test {
java {
srcDirs 'test'
}
resources {
srcDirs 'test'
include 'syntax.csv'
}
}
}
test {
useJUnitPlatform()
}
application {
mainClass = 'studio.core.Studio'
}
def buildTime() {
def df = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss")
return df.format(new Date())
}
task getBuildHash {
doLast {
file("src/build.txt").text = buildTime()
}
}
task convertNotes (type: JavaExec) {
mainClass = 'com.github.rjeschke.txtmark.Run'
classpath = configurations.txtmark
args 'notes.md'
standardOutput new FileOutputStream(new File(projectDir,"src/notes.html"))
}
processResources.dependsOn('getBuildHash', 'convertNotes')
task sourcesJar(type: Jar) {
classifier = 'sources'
duplicatesStrategy = 'warn'
from sourceSets.main.allSource
}
javadoc {
failOnError = false
}
javadoc.options.addStringOption('Xdoclint:none', '-quiet')
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
java {
withJavadocJar()
withSourcesJar()
}
def pubUsername = project.findProperty("ossrhUsername") ?: ""
def pubPassword = project.findProperty("ossrhPassword") ?: ""
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
pom {
name = 'Studio for kdb+'
packaging = 'jar'
// optionally artifactId can be defined here
description = 'Studio for kdb+ is a rapid development environment for the ultra-fast database kdb+ from Kx Systems: http://www.kx.com.'
url = 'https://github.com/dzmipt/kdbStudio'
scm {
connection = '[email protected]:dzmipt/kdbStudio.git'
developerConnection = '[email protected]:dzmipt/kdbStudio.git'
url = 'https://github.com/dzmipt/kdbStudio'
}
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'dzmipt'
name = 'Dmitry Zakharov'
email = '[email protected]'
}
}
}
}
}
repositories {
if(project.version.endsWith('-SNAPSHOT')) {
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
mavenContent {
snapshotsOnly()
}
credentials {
username pubUsername
password pubPassword
}
authentication {
basic(BasicAuthentication)
}
}
} else {
maven {
url "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
mavenContent {
releasesOnly()
}
credentials {
username pubUsername
password pubPassword
}
authentication {
basic(BasicAuthentication)
}
}
}
}
}
signing {
sign publishing.publications.mavenJava
}