Enable Docker builds

This commit is contained in:
idk
2021-05-03 21:32:02 -04:00
parent c5a0c3608d
commit 24b741be1e
7 changed files with 46 additions and 2 deletions

25
Dockerfile Normal file
View File

@ -0,0 +1,25 @@
FROM menny/android_ndk
ENV VERSION=0.9.49
ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
#ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/android-sdk-linux/cmdline-tools/latest/bin:/opt/android-sdk-linux/platform-tools
RUN echo 'deb https://deb.i2p2.de/ sid main' >> /etc/apt/sources.list
RUN echo 'deb-src https://deb.i2p2.de/ sid main' >> /etc/apt/sources.list
RUN wget -O /etc/apt/trusted.gpg.d/i2p-debian-repo.key.asc https://geti2p.net/_static/i2p-debian-repo.key.asc
RUN apt-get update
RUN apt-get build-dep -y i2p i2p-router
RUN apt-get install -y ant openjdk-8*
RUN git clone https://i2pgit.org/i2p-hackers/i2p.i2p -b i2p-$VERSION /opt/workspace/i2p.i2p
COPY . /opt/workspace/i2p.android.base
COPY etc/docker.local.ndk.properties /opt/workspace/i2p.android.base/client/local.properties
COPY etc/docker.local.router.properties /opt/workspace/i2p.android.base/routerjars/local.properties
COPY etc/docker.local.sdk.properties /opt/workspace/i2p.android.base/local.properties
COPY etc/docker.override.properties /opt/workspace/i2p.android.base/override.properties
COPY etc/docker.override.properties /opt/workspace/i2p.i2p/override.properties
WORKDIR /opt/workspace/i2p.android.base
RUN update-java-alternatives --jre-headless --set java-1.8.0-openjdk-amd64
RUN update-java-alternatives --set java-1.8.0-openjdk-amd64
RUN update-alternatives --set javac /usr/lib/jvm/java-8-openjdk-amd64/bin/javac
RUN update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
RUN rm /opt/java/openjdk/ -rfv
CMD ./gradlew dependencies || true ; ./gradlew assembleDebug
#CMD bash -c 'export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/android-sdk-linux/cmdline-tools/latest/bin:/opt/android-sdk-linux/platform-tools; ./gradlew dependencies || true ; ./gradlew assembleDebug'

View File

@ -10,6 +10,14 @@ At the time of this revision, 2020/09/13, the main Android maintainer is idk. id
Play, and f-droid.i2p.io, and nextl00p handles working with the F-Droid project to provide an I2P release
in their main repository.
## Docker
Docker users can use a shortcut to get an acceptable environment set up for building I2P for Android.
`
./app/build/outputs/apk/free/debug/app-free-debug.apk
`
## Prerequirements
1. Ensure you got the deprecated maven ant tasks. ( https://maven.apache.org/ant-tasks/download.cgi )
@ -22,7 +30,6 @@ in their main repository.
systems.
7. Ensure that you have a Java 1.7 bootclasspath available. (See **Maven Central** step 2A.)
## Get all the dependencies ready
### Maven Central

View File

@ -0,0 +1 @@
ndk.dir=/opt/android-sdk-linux/ndk/

View File

@ -0,0 +1 @@
i2psrc=/opt/workspace/i2p.i2p

View File

@ -0,0 +1 @@
sdk.dir=/opt/android-sdk-linux/

View File

@ -0,0 +1,9 @@
#javac.version=1.7
#javac.target=1.7
#javac.source=1.8
#javac.version=1.8
javac.release=8
#javac.compilerargs=-bootclasspath /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jce.jar
#javac.compilerargs=-bootclasspath /usr/lib/jvm/java-8-openjdk-amd64/rt.jar:/usr/lib/jvm/java-8-openjdk-amd64/jce.jar
#javac.compilerargs7=-bootclasspath /usr/lib/jvm/java-8-openjdk-amd64/rt.jar:/usr/lib/jvm/java-8-openjdk-amd64/jce.jar
#build.built-by=name

View File

@ -17,4 +17,4 @@ POM_DEVELOPER_EMAIL=hankhill19580@gmail.com
ANDROID_BUILD_TARGET_SDK_VERSION=29
ANDROID_BUILD_SDK_VERSION=28
I2P_VERSION=0.9.48-17
I2P_VERSION=0.9.49