-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
75 lines (65 loc) · 1.9 KB
/
build.gradle
File metadata and controls
75 lines (65 loc) · 1.9 KB
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
buildscript {
ext {
protobufVersion = '4.26.0-RC2'
}
}
plugins {
id("com.google.protobuf") version "0.9.4"
id("java")
id("java-gradle-plugin")
id("maven-publish")
id "com.google.cloud.artifactregistry.gradle-plugin" version "2.2.0"
}
group = "org.jdean"
version = "0.1.0"
java {
sourceCompatibility = 21
targetCompatibility = 21
}
publishing {
repositories {
maven {
url "artifactregistry://us-east1-maven.pkg.dev/testproj-310415/protojsonmerge"
}
}
}
repositories {
mavenCentral()
maven {
url "artifactregistry://us-east1-maven.pkg.dev/testproj-310415/protojsonmerge"
}
}
dependencies {
testImplementation(platform("org.junit:junit-bom:5.9.1"))
testImplementation("org.junit.jupiter:junit-jupiter")
implementation("com.google.protobuf:protobuf-java:${protobufVersion}")
implementation("com.google.protobuf:protobuf-java-util:${protobufVersion}")
implementation("commons-io:commons-io:2.15.1")
}
tasks.test {
useJUnitPlatform()
}
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:${protobufVersion}"
}
// For now I'm generating the descriptor set as part of the main project. This should likely be a Test resource.
generateProtoTasks {
all().configureEach{ task ->
// Generate descriptor set, include file/line numbers for debug, include transitive imports.
task.descriptorSetOptions.path =
"${projectDir}/build/resources/test/${task.sourceSet.name}.dsc"
task.generateDescriptorSet = true
task.descriptorSetOptions.includeSourceInfo = true
task.descriptorSetOptions.includeImports = true
}
}
}
gradlePlugin {
plugins {
simplePlugin {
id = "org.jdean.proto-json-merge"
implementationClass = 'protojsonmerge.ProtoJsonMergePlugin'
}
}
}