-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
119 lines (102 loc) · 3.81 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
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java Library project to get you started.
* For more details take a look at the Java Libraries chapter in the Gradle
* user guide available at https://docs.gradle.org/5.0/userguide/java_library_plugin.html
*/
plugins {
// Apply the java-library plugin to add support for Java Library
id 'java-library'
id 'maven-publish'
id 'signing'
}
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}
dependencies {
// This dependency is exported to consumers, that is to say found on their compile classpath.
//api 'org.apache.commons:commons-math3:3.6.1'
api 'com.google.code.gson:gson:2.8.5'
// This dependency is used internally, and not exposed to consumers on their own compile classpath.
// implementation 'com.google.guava:guava:26.0-jre'
// Use JUnit test framework
testImplementation 'junit:junit:4.12'
testImplementation 'org.antlr:antlr4-runtime:4.7.1'
}
group = 'com.github.pavinan'
version = '1.0.2-SNAPSHOT'
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
classifier = 'sources'
}
task javadocJar(type: Jar) {
from javadoc
classifier = 'javadoc'
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = "java.devextreme.helpers.datasource"
from components.java
artifact sourcesJar
artifact javadocJar
pom {
name = "java.devextreme.helpers.datasource"
description = "Creates a sql where clause from DevExtreme remote datasource with filtering."
url = "https://github.com/pavinan/java.devextreme.helpers.datasource"
licenses {
license {
name = 'MIT'
url = 'https://raw.githubusercontent.com/pavinan/java.devextreme.helpers.datasource/master/LICENSE'
}
}
developers {
developer {
id = "Bharat"
name = "Bharat Kumar Bellamkonda"
email = "[email protected]"
}
}
scm {
connection = 'scm:git:https://github.com/pavinan/java.devextreme.helpers.datasource.git'
developerConnection = 'scm:git:https://github.com/pavinan/java.devextreme.helpers.datasource.git'
url = 'https://github.com/pavinan/java.devextreme.helpers.datasource'
}
}
}
}
repositories {
maven {
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
if(project.hasProperty("sonatypeUsername") && project.hasProperty("sonatypePassword")) {
username = sonatypeUsername
password = sonatypePassword
} else {
username = "Dummy"
password = "Dummy"
}
}
}
}
}
gradle.taskGraph.whenReady { taskGraph ->
if (taskGraph.allTasks.any { it instanceof Sign }) {
ext."signing.keyId" = sonatypePGPKey
ext."signing.secretKeyRingFile" = sonatypePGPKeyFile
ext."signing.password" = sonatypePGPPass
}
}
signing {
sign publishing.publications.mavenJava
}
javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}