Skip to content

Commit

Permalink
Merge pull request #4570 from GoogleCloudPlatform/2.0.10-release-cand…
Browse files Browse the repository at this point in the history
…idate

Release candidate - 2.0.10
  • Loading branch information
adrish authored Apr 25, 2022
2 parents 45f1cc8 + 47eba96 commit b6aa7ad
Show file tree
Hide file tree
Showing 768 changed files with 40,741 additions and 14,851 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-iOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
runs-on: macOS-latest
strategy:
matrix:
destination: ['platform=iOS Simulator,OS=13.7,name=iPhone 11']
destination: ['platform=iOS Simulator,OS=15.0,name=iPhone 11']
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Force XCode 11.7
run: sudo xcode-select -switch /Applications/Xcode_11.7.app
- name: Force XCode 13.0
run: sudo xcode-select -switch /Applications/Xcode_13.0.app
- name: Build
run: |
cd iOS/MyStudies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Run check style
uses: nikitasavinov/checkstyle-action@master
uses: naveenr-btc/checkstyle-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: 'github-pr-check'
Expand Down
12 changes: 0 additions & 12 deletions Android/.idea/runConfigurations.xml

This file was deleted.

32 changes: 16 additions & 16 deletions Android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ android {
}
}

compileSdkVersion 29
compileSdkVersion 31
buildToolsVersion "28.0.3"
defaultConfig {

minSdkVersion 19
targetSdkVersion 29
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
minSdkVersion 21
targetSdkVersion 31
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
multiDexEnabled true
buildConfigField("String", "API_KEY", apikeyProperties['API_KEY'])
buildConfigField("String", "BASE_URL_STUDY_DATASTORE", apikeyProperties['BASE_URL_STUDY_DATASTORE'])
Expand Down Expand Up @@ -69,12 +69,12 @@ android {
}

dependencies {
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.multidex:multidex:2.0.0'
implementation 'com.google.firebase:firebase-messaging:17.4.0'
implementation 'com.google.firebase:firebase-core:16.0.7'
implementation 'com.google.code.gson:gson:2.8.2'
Expand All @@ -83,23 +83,23 @@ dependencies {
implementation 'de.greenrobot:eventbus:2.4.0'
implementation 'org.researchstack:backbone:1.1.1'
implementation 'com.github.bumptech.glide:glide:4.8.0'
implementation 'com.github.barteksc:android-pdf-viewer:2.4.0'
implementation 'com.kovachcode:timePickerWithSeconds:1.0.1'
implementation 'com.tom_roush:pdfbox-android:1.8.10.1'
implementation 'com.android.support:customtabs:28.0.0'
implementation 'androidx.browser:browser:1.0.0'
implementation 'junit:junit:4.13'

//please remove these 2 dependencies for release build
implementation 'com.facebook.stetho:stetho:1.5.0'
implementation 'com.uphyca:stetho_realm:2.1.0'

implementation 'com.github.LucasFsc:Html2Pdf:0.2-beta'
implementation 'com.github.naveenr-btc:RangeSeekBar:3.0.2'

androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
implementation 'com.github.chrisbanes:PhotoView:2.3.0'

androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
androidTestImplementation "com.squareup.okhttp3:mockwebserver:4.4.0"
testImplementation 'org.mockito:mockito-android:2.11.0'
androidTestImplementation 'androidx.test:rules:1.2.0'
testImplementation 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

import android.content.Context;
import android.os.Bundle;
import android.support.test.InstrumentationRegistry;
import androidx.test.platform.app.InstrumentationRegistry;
import com.google.firebase.messaging.RemoteMessage;
import com.harvard.storagemodule.DbServiceSubscriber;
import com.harvard.studyappmodule.studymodel.Study;
Expand Down Expand Up @@ -70,9 +70,9 @@ public class AppFirebaseMessagingServiceTest {

@Before
public void setUp() {
realm = AppController.getRealmobj(InstrumentationRegistry.getTargetContext());
realm = AppController.getRealmobj(InstrumentationRegistry.getInstrumentation().getTargetContext());
dbServiceSubscriber = new DbServiceSubscriber();
context = InstrumentationRegistry.getTargetContext();
context = InstrumentationRegistry.getInstrumentation().getTargetContext();
}

@Test
Expand Down Expand Up @@ -144,7 +144,6 @@ public void execute(Realm realm) {

private Study getstudy() {
StudyList studyList = new StudyList();
studyList.setBookmarked(STUDYLISTBOOKMARKED);
studyList.setCategory(STUDYLISTCATEGORY);
studyList.setLogo(STUDYLISTLOGO);
studyList.setPdfPath(STUDYLISTPDFPATH);
Expand All @@ -166,7 +165,6 @@ private Study getstudy() {

private StudyData getStudyData() {
Studies studies = new Studies();
studies.setBookmarked(false);
studies.setSiteId(SITEID);
studies.setEnrolledDate(ENROLLEDDATE);
studies.setParticipantId(PARTICIPANTID);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.harvard;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;
Expand All @@ -16,11 +16,11 @@
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();

assertEquals("com.harvard", appContext.getPackageName());
}
assertEquals("com.harvard", appContext.getPackageName());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;

import android.support.test.runner.AndroidJUnit4;
import androidx.test.runner.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;

import android.support.test.InstrumentationRegistry;
import androidx.test.platform.app.InstrumentationRegistry;
import com.harvard.studyappmodule.activitylistmodel.ActivitiesWS;
import com.harvard.studyappmodule.activitylistmodel.ActivityListData;
import com.harvard.studyappmodule.activitylistmodel.AnchorDate;
Expand Down Expand Up @@ -56,7 +56,7 @@ public class DbServiceSubscriberTest {

@Before
public void setUp() {
realm = AppController.getRealmobj(InstrumentationRegistry.getTargetContext());
realm = AppController.getRealmobj(InstrumentationRegistry.getInstrumentation().getTargetContext());
dbServiceSubscriber = new DbServiceSubscriber();
}

Expand Down Expand Up @@ -155,7 +155,8 @@ private ActivitiesWS getactivitieswsdata() {
AnchorRuns anchorRuns = new AnchorRuns();
anchorRuns.setEndDays(TEST_END_DAYS);
anchorRuns.setStartDays(TEST_START_DAYS);
anchorRuns.setTime(TEST_TIME);
anchorRuns.setStartTime(TEST_TIME);
anchorRuns.setEndTime(TEST_TIME);
RealmList<FrequencyRuns> runslist = new RealmList<>();
runslist.add(frequencyRuns);
RealmList<AnchorRuns> anchorRunslist = new RealmList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;

import android.support.test.InstrumentationRegistry;
import androidx.test.platform.app.InstrumentationRegistry;
import com.harvard.storagemodule.DbServiceSubscriber;
import com.harvard.studyappmodule.surveyscheduler.SurveyScheduler;
import com.harvard.usermodule.webservicemodel.Studies;
Expand Down Expand Up @@ -50,7 +50,7 @@ public class SurveyActivitiesFragmentTest {

@Before
public void setUp() {
realm = AppController.getRealmobj(InstrumentationRegistry.getTargetContext());
realm = AppController.getRealmobj(InstrumentationRegistry.getInstrumentation().getTargetContext());
dbServiceSubscriber = new DbServiceSubscriber();
}

Expand Down Expand Up @@ -106,7 +106,6 @@ private Studies getStudies() {
studies.setStatus(TEST_STATUS);
studies.setSiteId(TEST_SITE_ID);
studies.setEnrolledDate(TEST_ENROLLMENTDATE);
studies.setBookmarked(TEST_BOOKMARKED);
studies.setParticipantId(TEST_PARTICIPANT_ID);
studies.setCompletion(TEST_COMPLETION);
studies.setAdherence(TEST_ADHERENCE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import static junit.framework.TestCase.assertTrue;
import static junit.framework.TestCase.fail;

import android.support.test.InstrumentationRegistry;
import androidx.test.platform.app.InstrumentationRegistry;
import com.harvard.studyappmodule.activitylistmodel.ActivitiesWS;
import com.harvard.studyappmodule.activitylistmodel.AnchorRuns;
import com.harvard.studyappmodule.activitylistmodel.Frequency;
Expand Down Expand Up @@ -80,7 +80,7 @@ public void getDatesAdapterTest() {
TEST_POSITION,
joiningdate,
startDate,
InstrumentationRegistry.getTargetContext(), status);
InstrumentationRegistry.getInstrumentation().getTargetContext(), status);
assertTrue(anchordate.toLowerCase().contains(TEST_RESULT_ONE.toLowerCase()));

String regular =
Expand All @@ -90,7 +90,7 @@ public void getDatesAdapterTest() {
TEST_POSITION,
startDate,
joiningdate,
InstrumentationRegistry.getTargetContext(), status);
InstrumentationRegistry.getInstrumentation().getTargetContext(), status);
assertTrue(regular.toLowerCase().contains(TEST_RESULT_TWO.toLowerCase()));

String studyLifeTime =
Expand All @@ -100,7 +100,7 @@ public void getDatesAdapterTest() {
TEST_POSITION,
startDate,
joiningdate,
InstrumentationRegistry.getTargetContext(), status);
InstrumentationRegistry.getInstrumentation().getTargetContext(), status);
assertTrue(studyLifeTime.toLowerCase().contains(TEST_RESULT_THREE.toLowerCase()));
}

Expand All @@ -111,7 +111,8 @@ private ActivitiesWS getactivitieswsdata() {
AnchorRuns anchorRuns = new AnchorRuns();
anchorRuns.setEndDays(TEST_END_DAYS);
anchorRuns.setStartDays(TEST_START_DAYS);
anchorRuns.setTime(TEST_TIME);
anchorRuns.setStartTime(TEST_TIME);
anchorRuns.setEndTime(TEST_TIME);
RealmList<FrequencyRuns> runslist = new RealmList<>();
runslist.add(frequencyRuns);
RealmList<AnchorRuns> anchorRunslist = new RealmList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import static org.hamcrest.Matchers.equalTo;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
import androidx.test.platform.app.InstrumentationRegistry;
import com.google.gson.Gson;
import com.harvard.R;
import com.harvard.storagemodule.DbServiceSubscriber;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;
import com.google.gson.Gson;
import com.harvard.usermodule.webservicemodel.ChangePasswordData;
import com.harvard.usermodule.webservicemodel.LoginData;
Expand Down Expand Up @@ -96,7 +96,7 @@ public MockResponse dispatch(@NotNull RecordedRequest recordedRequest)
e.printStackTrace();
}
async = new ApiCallSyncronizer();
ApiCall apiCall = new ApiCall(InstrumentationRegistry.getTargetContext());
ApiCall apiCall = new ApiCall(InstrumentationRegistry.getInstrumentation().getTargetContext());
apiCall.apiCallPostJson(
url.toString(),
new HashMap<String, String>(),
Expand Down Expand Up @@ -149,7 +149,7 @@ public MockResponse dispatch(@NotNull RecordedRequest recordedRequest)
JSONObject params = new JSONObject();
URL url = mockWebServer.url(studyListUrl.toString()).url();
async = new ApiCallSyncronizer();
ApiCall apiCall = new ApiCall(InstrumentationRegistry.getTargetContext());
ApiCall apiCall = new ApiCall(InstrumentationRegistry.getInstrumentation().getTargetContext());
apiCall.apiCallPostJson(
url.toString(),
new HashMap<String, String>(),
Expand Down Expand Up @@ -210,7 +210,7 @@ public MockResponse dispatch(@NotNull RecordedRequest recordedRequest)
}
URL url = mockWebServer.url(studyListUrl.toString()).url();
async = new ApiCallSyncronizer();
ApiCall apiCall = new ApiCall(InstrumentationRegistry.getTargetContext());
ApiCall apiCall = new ApiCall(InstrumentationRegistry.getInstrumentation().getTargetContext());
apiCall.apiCallPostJson(
url.toString(),
new HashMap<String, String>(),
Expand Down Expand Up @@ -268,7 +268,7 @@ public MockResponse dispatch(@NotNull RecordedRequest recordedRequest)
e.printStackTrace();
}
async = new ApiCallSyncronizer();
ApiCall apiCall = new ApiCall(InstrumentationRegistry.getTargetContext());
ApiCall apiCall = new ApiCall(InstrumentationRegistry.getInstrumentation().getTargetContext());
apiCall.apiCallPutJson(
url.toString(),
new HashMap<String, String>(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,18 @@

package com.harvard.usermodule;

import static android.support.test.InstrumentationRegistry.getTargetContext;
import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.assertion.ViewAssertions.matches;
import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
import static androidx.test.espresso.matcher.ViewMatchers.withText;

import android.content.Intent;
import android.net.Uri;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.rule.ActivityTestRule;
import androidx.test.runner.AndroidJUnit4;

import com.harvard.AppConfig;
import com.harvard.BuildConfig;
import com.harvard.R;
Expand All @@ -38,7 +39,7 @@ public void errorTest() {
AppConfig.AppType = BuildConfig.APP_TYPE;
Intent intent =
new Intent(Intent.ACTION_VIEW, Uri.parse(URL))
.setPackage(getTargetContext().getPackageName());
.setPackage(InstrumentationRegistry.getInstrumentation().getTargetContext().getPackageName());
activityRule.launchActivity(intent);
onView(withId(R.id.activity_gateway)).check(matches(isDisplayed()));
onView(withId(R.id.mNewUserButton)).check(matches(withText(R.string.new_user)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

import android.app.Application;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import androidx.test.platform.app.InstrumentationRegistry;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
Expand Down
Loading

0 comments on commit b6aa7ad

Please sign in to comment.