-
Notifications
You must be signed in to change notification settings - Fork 15
/
build2.gradleDeprecated
262 lines (218 loc) · 7.22 KB
/
build2.gradleDeprecated
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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
buildscript {
repositories {
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "gradle.plugin.install4j.install4j:gradle_plugin:7.0.8"
}
}
plugins{
id 'org.hidetake.ssh' version '2.7.1'
id 'java-library'
id 'maven-publish'
id 'signing'
}
apply plugin: 'application'
apply plugin: 'distribution'
repositories {
mavenCentral()
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(15)
}
}
dependencies {
implementation 'com.github.albfernandez:javadbf:1.14.0'
implementation 'com.h2database:h2:2.1.214'
testImplementation 'junit:junit:4.13.2'
}
compileJava{
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
jar {
archiveFileName ="dbschema-dbf-jdbc${driverVersion}.jar"
manifest {
attributes 'Main-Class': 'com.wisecoders.dbschema.dbf.JdbcDriver'
attributes 'Specification-Version': "$driverVersion"
attributes 'Specification-Vendor': "Wise Coders"
attributes 'Implementation-Vendor-Id': "dbschema.com"
attributes 'Implementation-Vendor': "Wise Coders"
attributes 'Implementation-Version': new Date().format( 'yyMMdd' )
}
}
task zip(type: Zip, dependsOn:['clean','jar']) {
archiveFileName.set 'DBFJdbcDriver.zip'
from configurations.runtimeClasspath.allArtifacts.files
from configurations.runtimeClasspath
from "build/libs" include "*.jar"
}
task copyInUserHome(type: Copy,dependsOn:['clean','jar']) {
from configurations.runtimeClasspath.allArtifacts.files
from configurations.runtimeClasspath
into "${System.getProperty('user.home')}/.DbSchema/drivers/DBF/"
}
group = 'com.wisecoders'
version = '1.0'
java {
withJavadocJar()
withSourcesJar()
}
// gradle publish
// https://www.youtube.com/watch?v=24gsrR9jsF4
// https://www.jetbrains.com/help/space/publish-artifacts-to-maven-central.html
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'dbf-jdbc-driver'
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = 'DBF JDBC Driver'
description = 'DBF and FoxPro Open Source JDBC Driver'
url = 'http://www.dbschema.com'
licenses {
license {
name = 'GPL-3Plus dual license. Contributions only to https://github.com/wise-coders/dbf-jdbc-driver'
url = 'https://github.com/wise-coders/dbf-jdbc-driver'
}
}
developers {
developer {
id = 'WiseCoders'
name = 'Wise Coders GmbH'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com/wise-coders/dbf-jdbc-driver'
developerConnection = 'scm:git:ssh://github.com/wise-coders/dbf-jdbc-driver'
url = 'https://github.com/wise-coders/dbf-jdbc-driver'
}
}
}
}
repositories {
mavenCentral()
maven { url "https://s01.oss.sonatype.org/" }
}
/*
repositories {
maven {
// change URLs to point to your repos, e.g. http://my.org/repo
def releasesRepoUrl = layout.buildDirectory.dir('repos/releases')
def snapshotsRepoUrl = layout.buildDirectory.dir('repos/snapshots')
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
}
}*/
}
signing {
sign publishing.publications.mavenJava
}
/*
task sourceJar(type: Jar) {
from sourceSets.main.java
from sourceSets.main.resources
archiveClassifier.set('sources')
}
task javadocJar(type: Jar) {
dependsOn javadoc
from javadoc.destinationDir
archiveClassifier.set('javadoc')
}
artifacts {
archives sourceJar
archives javadocJar
}
group = "com.wisecoders.dbf-jdbc-driver"
archivesBaseName = "dbf-jdbc-driver"
version = "1.1.0"
task uploadArchives {
repositories {
mavenDeployer {
repository(url: "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://s01.oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom.project {
name 'DBF JDBC Driver'
packaging 'jar'
description 'An Open-Source JDBC Driver for DBF / FoxPro databases'
url 'http://www.dbschema.com'
scm {
connection 'scm:svn:http://foo.googlecode.com/svn/trunk/'
developerConnection 'scm:svn:https://foo.googlecode.com/svn/trunk/'
url 'http://foo.googlecode.com/svn/trunk/'
}
licenses {
license {
name 'GPL-3 dual license. Free to use, code modificatins only to the https://github.com/wise-coders/dbf-jdbc-driver'
url 'https://github.com/wise-coders/dbf-jdbc-driver'
}
}
developers {
developer {
id 'WiseCoders'
name 'Wise Coders GmbH'
email '[email protected]'
}
}
}
}
}
}
plugins {
id 'maven-publish'
}
// https://dzone.com/articles/publish-your-artifacts-to-maven-central
publishing {
publications {
mavenJava(MavenPublication) {
pom {
name = 'dBase DBF JDBC Driver'
description = 'Open Source JDBC Driver for dBase DBF Database Files'
url = 'http://www.dbschema.com'
licenses {
license {
name = 'Free to use, Distribution Forbidden'
url = 'http://dbschema.com'
}
}
developers {
developer {
id = 'dprutean'
name = 'Dragos Pruteanu'
email = '[email protected]'
}
}
scm {
connection = 'https://github.com/dprutean/dbf-jdbc-driver.git'
developerConnection = 'https://github.com/dprutean/dbf-jdbc-driver.git'
url = 'https://github.com/dprutean/dbf-jdbc-driver.git'
}
}
}
}
}
*/
/*
task nexusPublishing {
repositories {
sonatype {
username = project.hasProperty('sonatypeUsername') ? project.property('sonatypeUsername') : ''
password = project.hasProperty('sonatypePassword') ? project.property('sonatypePassword') : ''
}
}
}
*/