Skip to content

Commit e6f445b

Browse files
committed
Use openjdk 11.
1 parent 17a811c commit e6f445b

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

buildscripts/kokoro/unix.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ cat <<EOF >> gradle.properties
3434
org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=1024m
3535
EOF
3636

37-
ARCH="$ARCH" buildscripts/make_dependencies.sh
37+
#ARCH="$ARCH" buildscripts/make_dependencies.sh
3838

3939
# Set properties via flags, do not pollute gradle.properties
4040
GRADLE_FLAGS="${GRADLE_FLAGS:-}"

buildscripts/make_dependencies.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
echo on
22
@rem set PROTOBUF_VER=21.7
33
choco install -y gradle git curl pkgconfiglite
4-
choco install -y openjdk --version=21.0
4+
choco install -y openjdk --version=11.0.27
55
set JAVA_HOME="c:\Program Files\OpenJDK\jdk-21"
66
set PATH=%PATH%;"c:\Program Files\OpenJDK\jdk-21\bin"
77
set PROTOBUF_VER=22.5

buildscripts/make_dependencies.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,16 @@ if [ -f ${INSTALL_DIR}/bin/protoc ]; then
3030
echo "Not building protobuf. Already built"
3131
# TODO(ejona): swap to `brew install --devel protobuf` once it is up-to-date
3232
else
33+
if [[ ! -d "cmake-${CMAKE_VERSION}" ]]; then
34+
curl -Ls "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}.tar.gz" | tar xz
35+
fi
36+
# the same source dir is used for 32 and 64 bit builds, so we need to clean stale data first
37+
rm -rf "$DOWNLOAD_DIR/cmake-${CMAKE_VERSION}/bin"
38+
cd "$DOWNLOAD_DIR/cmake-${CMAKE_VERSION}"
39+
./bootstrap
40+
make
41+
make install
42+
ln -s /usr/local/bin/cmake /usr/bin/cmake
3343
cd "$DOWNLOAD_DIR"
3444
if [[ ! -d "protobuf-${PROTOBUF_VERSION}" ]]; then
3545
curl -Ls "https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/protobuf-${PROTOBUF_VERSION}.tar.gz" | tar xz

0 commit comments

Comments
 (0)