zhuyifan

升级

...@@ -10,9 +10,9 @@ plugins { ...@@ -10,9 +10,9 @@ plugins {
10 id 'java' 10 id 'java'
11 id 'idea' 11 id 'idea'
12 id 'application' 12 id 'application'
13 - id 'org.springframework.boot' version '2.3.3.RELEASE' 13 + id 'org.springframework.boot' version '2.5.12'
14 - id 'io.spring.dependency-management' version '1.0.10.RELEASE' 14 + id 'io.spring.dependency-management' version '1.1.6'
15 - id 'com.google.protobuf' version '0.9.3' 15 + id 'com.google.protobuf' version '0.9.4'
16 } 16 }
17 17
18 repositories { 18 repositories {
...@@ -29,8 +29,8 @@ application { ...@@ -29,8 +29,8 @@ application {
29 } 29 }
30 30
31 ext { 31 ext {
32 - grpcVersion = '1.39.0' 32 + grpcVersion = '1.62.2'
33 - protobufVersion = '3.17.2' 33 + protobufVersion = '3.25.3'
34 } 34 }
35 35
36 dependencies { 36 dependencies {
...@@ -55,20 +55,13 @@ dependencies { ...@@ -55,20 +55,13 @@ dependencies {
55 testImplementation "io.grpc:grpc-testing:${grpcVersion}" 55 testImplementation "io.grpc:grpc-testing:${grpcVersion}"
56 } 56 }
57 57
58 -static def isAppleSilicon() {
59 - // 检测 macOS 并且使用的是 Apple Silicon 架构
60 - return System.getProperty('os.name').toLowerCase().contains('mac') && System.getProperty('os.arch').equals('aarch64')
61 -}
62 -
63 -def protocPlatform = isAppleSilicon() ? ':osx-x86_64' : '';
64 -
65 protobuf { 58 protobuf {
66 protoc { 59 protoc {
67 - artifact = "com.google.protobuf:protoc:${protobufVersion}${protocPlatform}" 60 + artifact = "com.google.protobuf:protoc:${protobufVersion}"
68 } 61 }
69 plugins { 62 plugins {
70 grpc { 63 grpc {
71 - artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}${protocPlatform}" 64 + artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}"
72 } 65 }
73 } 66 }
74 generateProtoTasks { 67 generateProtoTasks {
...@@ -80,13 +73,6 @@ protobuf { ...@@ -80,13 +73,6 @@ protobuf {
80 } 73 }
81 } 74 }
82 75
83 -tasks.withType(JavaCompile).configureEach {
84 - it.options.incremental = true
85 - it.options.compilerArgs += ["-Xlint:unchecked", "-Xlint:deprecation"]
86 - it.options.encoding = "UTF-8"
87 - it.options.fork = true
88 -}
89 -
90 sourceSets { 76 sourceSets {
91 main { 77 main {
92 java { 78 java {
...@@ -98,6 +84,11 @@ sourceSets { ...@@ -98,6 +84,11 @@ sourceSets {
98 } 84 }
99 } 85 }
100 86
87 +tasks {
88 + compileJava {
89 + dependsOn generateProto
90 + }
91 +}
101 92
102 test { 93 test {
103 useJUnitPlatform() 94 useJUnitPlatform()
......
1 +# Specifies the JVM arguments used for the daemon process.
2 +# The setting is particularly useful for tweaking memory settings.
1 org.gradle.daemon=true 3 org.gradle.daemon=true
2 org.gradle.parallel=true 4 org.gradle.parallel=true
3 org.gradle.caching=true 5 org.gradle.caching=true
4 -org.gradle.jvmargs=-Xmx4096m -XX:MetaspaceSize=512m -XX:MaxMetaspaceSize=1024m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 6 +org.gradle.jvmargs=-Xmx8g -XX:MaxMetaspaceSize=1024m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
7 +org.gradle.incremental=true
5 org.gradle.configureondemand=true 8 org.gradle.configureondemand=true
6 -org.gradle.java.home=/usr/lib/jvm/java-11-openjdk-amd64
...\ No newline at end of file ...\ No newline at end of file
9 +org.gradle.configuration-cache=true
...\ No newline at end of file ...\ No newline at end of file
......
1 distributionBase=GRADLE_USER_HOME 1 distributionBase=GRADLE_USER_HOME
2 distributionPath=wrapper/dists 2 distributionPath=wrapper/dists
3 -distributionUrl=https://mirrors.cloud.tencent.com/gradle/gradle-6.9-bin.zip 3 +distributionUrl=https://mirrors.cloud.tencent.com/gradle/gradle-8.11-bin.zip
4 -networkTimeout=10000
5 zipStoreBase=GRADLE_USER_HOME 4 zipStoreBase=GRADLE_USER_HOME
6 zipStorePath=wrapper/dists 5 zipStorePath=wrapper/dists
6 +org.gradle.java.home=/usr/lib/jym/java-17-openidk-amd64
......