Commit 40b8a247 authored by beuc's avatar beuc

WIP sdk_tools

studio-3.2.1 -> studio-3.4.0 but still generates tools-26.1.1
compilation of Studio itself fails with missing Java lib
parent 26ec3388
\ No newline at end of file
FROM ubuntu:trusty-20191217
MAINTAINER Sylvain Beucler <[email protected]>
COPY /usr/src/
RUN /usr/src/
RUN useradd android -m -s /bin/bash
USER android
RUN mkdir /home/android/wd/
WORKDIR /home/android/wd/
COPY /home/android/
RUN /home/android/
CMD /bin/bash
.PHONY: all
docker build -t android-rebuilds:sdk_tools-$(VERSION) .
if [ ! -e wd/ ]; then mkdir wd/; fi
chown 1000:1000 wd/
cp -a wd/
docker run -it -v "$$(pwd)/wd:/home/android/wd" android-rebuilds:sdk_tools-$(VERSION) /home/android/wd/
#!/bin/bash -ex
# As of 2020-05, studio-3.4 still generates tools-26.1.1, like studio-3.2.1
~/bin/repo init --quiet -u -b studio-3.4.0
~/bin/repo sync --quiet --current-branch -j4
# Needed?
export USER=$(whoami)
#tools/base/bazel/bazel version
# SDK tools
mkdir -p out/dist
# Install required android.jar -- move to and when available
wget -c
unzip android-8.1.0/android.jar
mkdir -p prebuilts/studio/sdk/linux/platforms/android-27/
mv android-8.1.0/android.jar prebuilts/studio/sdk/linux/platforms/android-27/android.jar
# wants to create this directory
rm -rf out/dist/host-test-reports/
# Build
bash -x tools/buildSrc/servers/ `pwd`/out `pwd`/out/dist 0
# Android Studio
cd tools/idea/
bash -x ./
# Gradle plugin
cd tools/
./gradlew assemble
# TODO: this asks for a SDK, plus with more recent buildtools than we just compiled
./gradlew publishLocal || true
# buildscript {
# repositories {
# jcenter()
# maven { url '.../out/repo' }
# }
# dependencies {
# classpath ''
# The resulting repo lacks packages:
# which are present in the prebuilts
cat tools/base/files/ # +
ls -lh out/dist/ # SDK tools
ls -lh tools/idea/out/studio/dist/ # Android Studio
ls -lh out/repo/ # Android Gradle plugin
#!/bin/bash -ex
# Configuration
echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/00InstallRecommends
# clean-up non-free sources
# AFAICS we need to update the base image as of 2018-11-20 as it's already partially upgraded
cat <<EOF > /etc/apt/sources.list
deb trusty main universe
deb trusty-updates main universe
#deb trusty-security main universe
#deb trusty-backports main universe
dpkg --add-architecture i386
apt-get update
echo 'dash dash/sh boolean false' | debconf-set-selections
DEBIAN_FRONTEND=noninteractive dpkg-reconfigure --pri=high dash
export DEBIAN_FRONTEND=noninteractive
# OpenJDK 8 N/A
#apt-get -y install openjdk-8-jdk
apt-get -y install wget
wget --quiet
wget --quiet
wget --quiet
cat <<'EOF' > $checksumfile
0f5aba8db39088283b51e00054813063173a4d8809f70033976f83e214ab56c0 openjdk-8-jre-headless_8u45-b14-1_amd64.deb
9ef76c4562d39432b69baf6c18f199707c5c56a5b4566847df908b7d74e15849 openjdk-8-jre_8u45-b14-1_amd64.deb
6e47215cf6205aa829e6a0a64985075bd29d1f428a4006a80c9db371c2fc3c4c openjdk-8-jdk_8u45-b14-1_amd64.deb
sha256sum -c $checksumfile || exit 1
dpkg -i openjdk-8-jdk_8u45-b14-1_amd64.deb \
openjdk-8-jre-headless_8u45-b14-1_amd64.deb \
openjdk-8-jre_8u45-b14-1_amd64.deb || true
apt-get -y -f install
# Compiles 32-bit C++ programs
# 'emugen' compiled and run as 32-bit
apt-get -y install make binutils patch
apt-get -y install g++-multilib
apt-get -y install zip unzip libxml2-utils # zip/unzip/zip + xmllint
# Repo
apt-get install -y curl ca-certificates git python
#!/bin/bash -ex
#sudo apt-get install curl ca-certificates git python
mkdir ~/bin/
curl > ~/bin/repo
chmod a+x ~/bin/repo
# avoid prompts and errors
git config --global "[email protected]"
git config --global "Your Name"
git config --global color.ui true
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment