Skip to content

Commit

Permalink
Add task to build experimental engine in android
Browse files Browse the repository at this point in the history
  • Loading branch information
aanorbel committed Jan 5, 2024
1 parent cd58942 commit f032ad6
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 1 deletion.
6 changes: 5 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ allprojects {
}
}

task clean(type: Delete) {
task clean(type: Delete, dependsOn: ':engine-experimental:clean') {
delete rootProject.buildDir
}

task buildExperimentalArchive(dependsOn: ':engine-experimental:buildExperimentalArchive') {
println "main"
}
1 change: 1 addition & 0 deletions engine-experimental/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/oonimkall.aar
/oonimkall-sources.jar
10 changes: 10 additions & 0 deletions engine-experimental/build.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
configurations.maybeCreate("default")
artifacts.add("default", file('oonimkall.aar'))

task clean(type: Delete) {
delete 'oonimkall.aar'
delete 'oonimkall-sources.jar'
}

task buildExperimentalArchive(type: Exec) {
commandLine 'sh', 'mkdir' , '-p' , rootProject.buildDir
commandLine 'sh', "../scripts/build_experimental_archive.sh" , project.property('ooni.experimental.target') , rootProject.buildDir
}
1 change: 1 addition & 0 deletions engine-experimental/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ooni.experimental.target=master
29 changes: 29 additions & 0 deletions scripts/build_experimental_archive.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/sh

# Define build and output directories
gitTarget=${1:-"master"}
buildDir=${2:-"./build"}

# Create build directory and navigate into it
mkdir -p "${buildDir}" && cd "${buildDir}"

# Clone the repository
git clone -v https://github.com/ooni/probe-cli.git

# Navigate into the repository
cd probe-cli

git checkout master

git pull origin
# Checkout the target branch
git checkout -c "${gitTarget}"

# Build the probe-cli
make android

cp -v ./MOBILE/android/oonimkall.aar ../../engine-experimental/
cp -v ./MOBILE/android/oonimkall-sources.jar ../../engine-experimental/


echo "* Fetching geoip databases"

0 comments on commit f032ad6

Please sign in to comment.