-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
85 lines (67 loc) · 1.64 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
import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation
plugins {
id 'com.github.johnrengelman.shadow' version '7.0.0'
id "com.google.protobuf" version "0.8.17"
id "idea"
id 'java'
id "maven-publish"
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(16)
}
}
group 'com.github.technove'
version '3.2-SNAPSHOT'
repositories {
mavenCentral()
}
sourceSets {
main {
java {
srcDirs 'build/generated/source/proto/main/java'
}
}
}
protobuf {
protoc {
artifact = 'com.google.protobuf:protoc:3.8.0'
}
generateProtoTasks {
all().each { task ->
task.builtins {
java {
option "lite"
}
}
}
}
generateProtoTasks.generatedFilesBaseDir = 'generated-sources'
generatedFilesBaseDir = "$projectDir/src/generated"
}
shadowJar {
minimize()
includeEmptyDirs false
}
task relocateShadowJar(type: ConfigureShadowRelocation) {
target = tasks.shadowJar
prefix = "co.technove.flare.libs"
}
tasks.shadowJar.dependsOn tasks.relocateShadowJar
jar {
enabled = false
dependsOn(shadowJar { classifier = null })
}
dependencies {
compileOnly 'org.jetbrains:annotations:21.0.1'
implementation 'com.eclipsesource.minimal-json:minimal-json:0.9.5'
implementation 'com.google.protobuf:protobuf-javalite:3.17.3'
implementation 'com.google.protobuf:protobuf-java-util:3.14.0'
}
publishing {
publications {
shadow(MavenPublication) { publication ->
project.shadow.component(publication)
}
}
}