70 lines
1.7 KiB
Groovy
70 lines
1.7 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id 'org.springframework.boot' version '3.4.5'
|
|
id 'io.spring.dependency-management' version '1.1.6'
|
|
id 'org.graalvm.buildtools.native' version '0.10.3'
|
|
id 'com.google.protobuf' version '0.9.4'
|
|
}
|
|
|
|
group = 'com.example'
|
|
version = '0.9.0-SNAPSHOT'
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(17)
|
|
}
|
|
}
|
|
|
|
processTestAot {
|
|
enabled = false
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven { url 'https://repo.spring.io/milestone' }
|
|
maven { url 'https://repo.spring.io/snapshot' }
|
|
}
|
|
|
|
dependencyManagement {
|
|
imports {
|
|
mavenBom 'org.springframework.grpc:spring-grpc-dependencies:0.9.0-SNAPSHOT'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation 'org.springframework.grpc:spring-grpc-spring-boot-starter'
|
|
implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server'
|
|
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
|
|
implementation 'org.springframework.boot:spring-boot-starter-security'
|
|
implementation 'io.grpc:grpc-services'
|
|
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
|
testImplementation 'org.springframework.grpc:spring-grpc-test'
|
|
testImplementation 'org.springframework.experimental.boot:spring-boot-testjars-maven:0.0.4'
|
|
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
testLogging.showStandardStreams = true
|
|
outputs.upToDateWhen { false }
|
|
}
|
|
|
|
protobuf {
|
|
protoc {
|
|
artifact = "com.google.protobuf:protoc:${dependencyManagement.importedProperties['protobuf-java.version']}"
|
|
}
|
|
plugins {
|
|
grpc {
|
|
artifact = "io.grpc:protoc-gen-grpc-java:${dependencyManagement.importedProperties['grpc.version']}"
|
|
}
|
|
}
|
|
generateProtoTasks {
|
|
all()*.plugins {
|
|
grpc {
|
|
option 'jakarta_omit'
|
|
option '@generated=omit'
|
|
}
|
|
}
|
|
}
|
|
}
|