-
Notifications
You must be signed in to change notification settings - Fork 23
/
build.gradle
152 lines (135 loc) · 5.13 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
apply plugin: 'java'
apply plugin: 'com.google.protobuf'
apply plugin: 'maven-publish'
buildscript {
repositories {
maven { // The google mirror is less flaky than mavenCentral()
url "https://maven-central.storage-download.googleapis.com/repos/central/data/" }
}
dependencies { // ASSUMES GRADLE 2.12 OR HIGHER. Use plugin version 0.7.5 with earlier
// gradle versions
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.11' }
}
repositories {
maven { // The google mirror is less flaky than mavenCentral()
url "https://maven-central.storage-download.googleapis.com/repos/central/data/" }
mavenCentral()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
def libraryVersion = '1.6.9'
// IMPORTANT: You probably want the non-SNAPSHOT version of gRPC. Make sure you
// are looking at a tagged version of the example and not "master"!
// Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process.
def grpcVersion = '1.17.0' // CURRENT_GRPC_VERSION
def nettyTcNativeVersion = '2.0.17.Final'
def protobufVersion = '3.5.1'
def protocVersion = '3.5.1-1'
dependencies {
implementation fileTree(dir: 'dependences', include: ['*.jar'])
implementation "com.google.api.grpc:proto-google-common-protos:1.0.0"
implementation "io.grpc:grpc-alts:${grpcVersion}"
implementation "io.grpc:grpc-netty-shaded:${grpcVersion}"
implementation "io.grpc:grpc-protobuf:${grpcVersion}"
implementation "io.grpc:grpc-stub:${grpcVersion}"
runtimeOnly "javax.annotation:javax.annotation-api:1.3"
// Used in HelloWorldServerTls
implementation "io.grpc:grpc-netty:${grpcVersion}"
implementation "io.netty:netty-tcnative-boringssl-static:${nettyTcNativeVersion}"
implementation "com.google.protobuf:protobuf-java-util:${protobufVersion}"
testImplementation "io.grpc:grpc-testing:${grpcVersion}"
testImplementation "junit:junit:4.12"
testImplementation "org.mockito:mockito-core:1.9.5"
implementation 'com.fasterxml.jackson.core:jackson-databind:2.0.1'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.11.0'
implementation 'com.itextpdf:itext-pdfa:5.5.2'
implementation 'com.lowagie:itext:2.1.7'
implementation 'org.telegram:telegrambots:6.0.1'
}
protobuf {
protoc { artifact = "com.google.protobuf:protoc:${protocVersion}" }
plugins {
grpc { artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}" }
}
generateProtoTasks {
all()*.plugins { grpc {} }
}
}
// Inform IDEs like IntelliJ IDEA, Eclipse or NetBeans about the generated code.
sourceSets {
main {
java {
srcDirs 'build/generated/source/proto/main/grpc'
srcDirs 'build/generated/source/proto/main/java'
srcDirs 'src/main/proto'
}
}
}
// Generate IntelliJ IDEA's .idea & .iml project files
apply plugin: 'idea'
// Provide convenience executables for trying out the examples.
apply plugin: 'application'
startScripts.enabled = false
task ADempiereAllInOne(type: CreateStartScripts) {
mainClassName = 'org.spin.server.AllInOneServices'
applicationName = 'adempiere-all-in-one-server'
defaultJvmOpts = Arrays.asList("-DPropertyFile=Adempiere.properties", "-Dorg.adempiere.server.embedded=true")
outputDir = new File(project.buildDir, 'tmp')
classpath = jar.outputs.files + project.configurations.runtimeClasspath
}
applicationDistribution.into('bin') {
from(ADempiereAllInOne)
fileMode = 0755
}
// Create release for project
task createRelease(type: Copy) {
dependsOn build
from file("$buildDir/distributions/")
into file("$buildDir/release/")
//destinationDir(file('build/release/'))
doLast {
file('build/release/')
.listFiles({file -> file.isFile()} as FileFilter).sort()
.each { File file ->
ant.checksum file: file
}
}
}
publishing {
repositories {
maven {
url = "https://maven.pkg.github.com/erpcya/Repository"
credentials {
username = System.properties['deploy.user'] ?: System.getenv("GITHUB_DEPLOY_USER")
password = System.properties['deploy.token'] ?: System.getenv("GITHUB_DEPLOY_TOKEN")
}
}
}
publications {
mavenJava(MavenPublication) {
groupId 'org.erpya.adempiere.grpc'
artifactId 'adempiere-backend-grpc-server'
version libraryVersion
from components.java
pom {
name = 'gRPC Server for ADempiere'
description = 'A gRPC Server based on ADempiere Persistence Object'
url = 'https://www.erpya.com/'
licenses {
license {
name = 'GNU General Public License v3.0'
url = 'https://www.gnu.org/licenses/gpl-3.0.txt'
}
}
developers {
developer {
id = 'yamelsenih'
name = 'Yamel Senih'
email = '[email protected]'
}
}
}
}
}
}