Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ooni/probe-android into dev/ooni-…
Browse files Browse the repository at this point in the history
…run-v2
  • Loading branch information
aanorbel committed Jul 24, 2024
2 parents df4873a + 453191b commit 4a66878
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 23 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ jobs:

strategy:
matrix:
api-level: [ 29 ]
target: [ google_apis ]
api-level: [25, 29] # Bug in API 21-24
target: [default, google_apis]

steps:
- name: Set up JDK 17
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
uses: actions/checkout@v4

- name: Get issue number
uses: actions/github-script@v6
uses: actions/github-script@v7
id: get_issue_number
with:
script: |
Expand Down Expand Up @@ -187,13 +187,14 @@ jobs:
name: OoniDevFullDebugApk

- name: Upload artifact to Firebase App Distribution
uses: wzieba/[email protected]
id: uploadArtifact
with:
appId: ${{secrets.FIREBASE_APP_ID}}
serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }}
groups: testers
file: ooniDevFull/debug/app-ooni-dev-full-debug.apk
- name: Write Summary
env:
INPUT_APPID: ${{secrets.FIREBASE_APP_ID}}
INPUT_SERVICECREDENTIALSFILECONTENT: ${{ secrets.CREDENTIAL_FILE_CONTENT }}
GOOGLE_APPLICATION_CREDENTIALS: service_credentials_content.json
INPUT_GROUPS: testers
INPUT_FILE: ooniDevFull/debug/app-ooni-dev-full-debug.apk
run: |
echo "View this release in the Firebase console: ${{ steps.uploadArtifact.outputs.FIREBASE_CONSOLE_URI }}" >> $GITHUB_STEP_SUMMARY
cat <<< "${INPUT_SERVICECREDENTIALSFILECONTENT}" > service_credentials_content.json
sudo npm install -g firebase-tools
firebase appdistribution:distribute "$INPUT_FILE" --app "$INPUT_APPID" --groups "$INPUT_GROUPS" --testers "$INPUT_TESTERS" --release-notes "$(git log -1 --pretty=short)"
9 changes: 7 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ android {

buildTypes {
debug {
testCoverageEnabled true
buildConfigField 'String', 'IS_DEBUG', '"-debug"'
buildConfigField 'String', 'COUNTLY_KEY', '"e6c2cfe53e85951d50567467cef3f9fa2eab32c3"'
enableUnitTestCoverage true
enableAndroidTestCoverage true
}

release {
Expand Down Expand Up @@ -115,12 +116,14 @@ android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
coreLibraryDesugaringEnabled = true
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17
}
buildFeatures {
viewBinding = true
buildConfig = true
}
dataBinding {
enabled = true
Expand All @@ -132,6 +135,9 @@ android {
dependencies {
implementation project(path: ':engine')

// Desugaring
coreLibraryDesugaring(libs.desugar.jdk.libs.nio)

// AndroidX
implementation libs.androidx.appcompat
implementation libs.androidx.constraintlayout
Expand Down Expand Up @@ -185,7 +191,6 @@ dependencies {
testImplementation libs.androidx.runner
testImplementation libs.androidx.rules
testImplementation libs.mockito.core
testImplementation libs.mockito.inline
testImplementation libs.robolectric
testImplementation libs.faker
testImplementation libs.ooni.oonimkall
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ public void onCreate() {

@Override
public int onStartCommand(Intent intent, int flags, int startId) {
@SuppressWarnings("unchecked")
ArrayList<AbstractSuite> testSuites = (ArrayList<AbstractSuite>) intent.getSerializableExtra("testSuites");
if (testSuites == null || testSuites.size() == 0)
if (testSuites == null || testSuites.isEmpty())
return START_STICKY_COMPATIBILITY;
boolean store_db = intent.getBooleanExtra("storeDB", true);
boolean unattended = intent.getBooleanExtra("unattended", false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public void readableFileSize() {
@Test
public void getLastResult() {
Result first = new Result("");
first.start_time = new Date(System.currentTimeMillis() - 1000);
first.save();
Result second = new Result("");
second.save();
Expand Down
1 change: 0 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
android.defaults.buildfeatures.buildconfig=true
android.enableJetifier=true
android.nonFinalResIds=false
android.nonTransitiveRClass=false
Expand Down
14 changes: 7 additions & 7 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[versions]
androidGradlePlugin = "8.4.0"
androidGradlePlugin = "8.5.1"
barista = "3.9.0"
countlySdk = "24.7.0"
desugar_jdk_libs_nio = "2.0.4"
faker = "2.0.4"
mockitoCore = "5.12.0"
mockitoInline = "5.2.0"
mockito = "5.12.0"
robolectric = "4.13"
fastlaneScreengrab = "2.1.1"
sentryAndroid = "7.11.0"
sentryAndroid = "7.12.0"
xanscaleLocalhostToolkit = "19.05.01"
commonsIo = "2.16.1"
jacoco = "0.8.7"
Expand All @@ -31,7 +31,7 @@ googleGson = "2.11.0"
googleGuava = "33.2.1-android"
googleMaterial = "1.12.0"
googleDagger = "2.51.1"
googleFirebaseBon = "33.1.0"
googleFirebaseBon = "33.1.2"
googlePlayAppUpdate = "2.1.0"

# OONI
Expand All @@ -57,6 +57,7 @@ gms-googleServices = "4.4.1"
android-gradlePlugin = { group = "com.android.tools.build", name = "gradle", version.ref = "androidGradlePlugin" }
barista = { module = "com.schibsted.spain:barista", version.ref = "barista" }
countly-sdk = { module = "ly.count.android:sdk", version.ref = "countlySdk" }
desugar_jdk_libs_nio = { module = "com.android.tools:desugar_jdk_libs_nio", version.ref = "desugar_jdk_libs_nio" }
faker = { module = "com.github.blocoio:faker", version.ref = "faker" }
robolectric = { module = "org.robolectric:robolectric", version.ref = "robolectric" }
fastlane-screengrab = { module = "tools.fastlane:screengrab", version.ref = "fastlaneScreengrab" }
Expand All @@ -65,8 +66,7 @@ xanscale-localhost-toolkit = { module = "com.github.xanscale.LocalhostToolkit:ap
commons-io = { module = "commons-io:commons-io", version.ref = "commonsIo" }
kotlin-gradlePlugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" }

mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockitoCore" }
mockito-inline = { module = "org.mockito:mockito-inline", version.ref = "mockitoInline" }
mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockito" }

lottie = { module = "com.airbnb.android:lottie", version.ref = "lottie" }
markwon-core = { module = "io.noties.markwon:core", version.ref = "markwon" }
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Oct 25 19:25:06 WAT 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 4a66878

Please sign in to comment.