generated from adempiere/adempiere-template-project
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
139 lines (120 loc) · 3.65 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
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
}
sourceCompatibility = 1.11
def baseVersion = '3.9.4'
def baseGroupId = 'io.github.adempiere'
def grpcVersion = '1.65.1'
def protobufVersion = '3.25.4'
repositories {
mavenLocal()
mavenCentral()
}
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
dependencies {
api fileTree(
dir: 'lib',
include: [
'*.jar'
]
)
api "io.grpc:grpc-netty-shaded:${grpcVersion}"
api "com.google.protobuf:protobuf-java:${protobufVersion}"
api "com.google.protobuf:protobuf-java-util:${protobufVersion}"
api "io.jsonwebtoken:jjwt-api:0.12.6"
api "io.jsonwebtoken:jjwt-impl:0.12.6"
api "io.jsonwebtoken:jjwt-jackson:0.12.6"
// ADempiere Core
api "${baseGroupId}:base:${baseVersion}"
api "${baseGroupId}:adempiere-jwt-token:1.0.2"
}
sourceSets {
main {
java {
srcDirs = ['src/main/java']
}
}
}
java {
withJavadocJar()
withSourcesJar()
}
def entityType = 'D'
group = "io.github.adempiere"
version = findProperty("deployVersion") ?: "local-1.0.0"
jar {
manifest {
attributes(
"Implementation-Title": "ADempiere gRPC Utils",
"Implementation-Version": version,
"EntityType": entityType
)
}
}
publishing {
repositories {
mavenLocal()
maven {
url = findProperty("deployPublishUrl") ?: System.properties['deploy.publish_url']
credentials {
username = findProperty("deployUsername") ?: System.properties['deploy.user']
password = findProperty("deployPassword") ?: System.properties['deploy.token']
}
}
}
publications {
mavenJava(MavenPublication) {
groupId = group
artifactId = 'adempiere-grpc-utils'
version = version
from components.java
pom {
name = 'ADempiere gRPC Utils'
description = 'Utils classes for start a gRPC easy using ADempiere'
url = 'http://adempiere.io/'
licenses {
license {
name = 'GNU General Public License, version 2'
url = 'https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt'
}
}
developers {
developer {
id = 'yamelsenih'
name = 'Yamel Senih'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com/adempiere/adempiere-grpc-utils.git'
developerConnection = 'scm:git:ssh://github.com/adempiere/adempiere-grpc-utils.git'
url = 'http://github.com/adempiere/adempiere-grpc-utils'
}
}
}
}
}
task cleanBuildPublishLocal(type: GradleBuild) {
tasks = ['clean', 'build', 'publishToMavenLocal']
}
signing {
def isReleaseVersion = !version.toString().startsWith("local") && !version.toString().endsWith("-SNAPSHOT")
sign configurations.archives
setRequired {
// signing is required if this is a release version and the artifacts are to be published
// do not use hasTask() as this require realization of the tasks that maybe are not necessary
(isReleaseVersion || version.toString().equals("build")) && gradle.taskGraph.allTasks.any {
it.equals(PublishToMavenRepository)
}
}
def signingKey = findProperty("deploySigningKey")
def signingPassword = findProperty("deploySigningPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mavenJava
}