xref: /aosp_15_r20/external/grpc-grpc-java/buildscripts/kokoro/windows64.bat (revision e07d83d3ffcef9ecfc9f7f475418ec639ff0e5fe)
1*e07d83d3SAndroid Build Coastguard Worker@rem ##########################################################################
2*e07d83d3SAndroid Build Coastguard Worker@rem
3*e07d83d3SAndroid Build Coastguard Worker@rem Builds artifacts for x86_64 into %WORKSPACE%\artifacts\
4*e07d83d3SAndroid Build Coastguard Worker@rem
5*e07d83d3SAndroid Build Coastguard Worker@rem ##########################################################################
6*e07d83d3SAndroid Build Coastguard Worker
7*e07d83d3SAndroid Build Coastguard Workertype c:\VERSION
8*e07d83d3SAndroid Build Coastguard Worker
9*e07d83d3SAndroid Build Coastguard Worker@rem Enter repo root
10*e07d83d3SAndroid Build Coastguard Workercd /d %~dp0\..\..
11*e07d83d3SAndroid Build Coastguard Worker
12*e07d83d3SAndroid Build Coastguard Workerset WORKSPACE=T:\src\github\grpc-java
13*e07d83d3SAndroid Build Coastguard Workerset ESCWORKSPACE=%WORKSPACE:\=\\%
14*e07d83d3SAndroid Build Coastguard Worker
15*e07d83d3SAndroid Build Coastguard Worker@rem Clear JAVA_HOME to prevent a different Java version from being used
16*e07d83d3SAndroid Build Coastguard Workerset JAVA_HOME=
17*e07d83d3SAndroid Build Coastguard Workerset PATH=C:\Program Files\java\jdk1.8.0_152\bin;%PATH%
18*e07d83d3SAndroid Build Coastguard Worker
19*e07d83d3SAndroid Build Coastguard Workermkdir grpc-java-helper64
20*e07d83d3SAndroid Build Coastguard Workercd grpc-java-helper64
21*e07d83d3SAndroid Build Coastguard Workercall "%VS140COMNTOOLS%\..\..\VC\bin\amd64\vcvars64.bat" || exit /b 1
22*e07d83d3SAndroid Build Coastguard Workercall "%WORKSPACE%\buildscripts\make_dependencies.bat" || exit /b 1
23*e07d83d3SAndroid Build Coastguard Worker
24*e07d83d3SAndroid Build Coastguard Workercd "%WORKSPACE%"
25*e07d83d3SAndroid Build Coastguard Worker
26*e07d83d3SAndroid Build Coastguard WorkerSET TARGET_ARCH=x86_64
27*e07d83d3SAndroid Build Coastguard WorkerSET FAIL_ON_WARNINGS=true
28*e07d83d3SAndroid Build Coastguard WorkerSET VC_PROTOBUF_LIBS=%ESCWORKSPACE%\\grpc-java-helper64\\protobuf-%PROTOBUF_VER%\\build\\Release
29*e07d83d3SAndroid Build Coastguard WorkerSET VC_PROTOBUF_INCLUDE=%ESCWORKSPACE%\\grpc-java-helper64\\protobuf-%PROTOBUF_VER%\\build\\include
30*e07d83d3SAndroid Build Coastguard WorkerSET GRADLE_FLAGS=-PtargetArch=%TARGET_ARCH% -PfailOnWarnings=%FAIL_ON_WARNINGS% -PvcProtobufLibs=%VC_PROTOBUF_LIBS% -PvcProtobufInclude=%VC_PROTOBUF_INCLUDE% -PskipAndroid=true
31*e07d83d3SAndroid Build Coastguard WorkerSET GRADLE_OPTS="-Dorg.gradle.jvmargs='-Xmx1g'"
32*e07d83d3SAndroid Build Coastguard Worker
33*e07d83d3SAndroid Build Coastguard Worker@rem make sure no daemons have any files open
34*e07d83d3SAndroid Build Coastguard Workercmd.exe /C "%WORKSPACE%\gradlew.bat --stop"
35*e07d83d3SAndroid Build Coastguard Worker
36*e07d83d3SAndroid Build Coastguard Workercmd.exe /C "%WORKSPACE%\gradlew.bat  %GRADLE_FLAGS% -Dorg.gradle.parallel=false -PrepositoryDir=%WORKSPACE%\artifacts grpc-compiler:clean grpc-compiler:build grpc-compiler:publish" || exit /b 1
37