Skip to content

Commit f6ebec7

Browse files
authored
Release 8.3.3 (#95)
* Maps marker deselect and UI changes (#84) - Closed #79 Merge map fix into develop * Test structure now mirrors src structure (#85) * Dagger 2 and some bug fixes (#86) * Added initial dagger modules * Implemented dagger functionality in all legacy BMController calls, also fixed gym group_ex crash bug and general clean up * Updated gradle version and dependencies to make bitrise happy * Limited bounds of autocomplete search on BearTransit map * fixed library hours not being right justified by using changing width to match parent (#87) * Limited autocomplete search to Berkeley area for BearTransit map (#94) * Updated CONTRIBUTING.md Changed instructions to tell open source contributors to make a PR to develop instead of master * Limited bounds of autocomplete search on BearTransit map * Added release notes * Removed google-services.json from readme * Fixed bounds for Destination
1 parent 5654398 commit f6ebec7

28 files changed

+362
-262
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ It is recommended you use Android Studio 3.0.0.
4545
* Create a new project in the [Google Cloud Console](https://console.cloud.google.com)
4646
* Under the APIs and Services tab, enable the Google Places API for Android, Google Maps Directions API, Google Maps Android API, and Google Maps Geocoding API
4747
* Under the Credentials tab, create an API key
48-
* Paste your API key into [secret.xml](app/src/main/res/values/secret.xml) and [google-services.json](app/google-services.json)
48+
* Paste your API key into [secret.xml](app/src/main/res/values/secret.xml)
4949
* We've configured this repository so that the application pulls from our sandbox backend, which just returns test data. If you would like access to our production backend API, please [contact us](#contact).
5050

5151
## Contributing [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/asuc-octo/berkeley-mobile-android/issues)

app/build.gradle

Lines changed: 58 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apply plugin: 'io.fabric'
33

44
android {
55
compileSdkVersion 25
6-
buildToolsVersion '26.0.2'
6+
buildToolsVersion '28.0.3'
77

88
defaultConfig {
99
applicationId "com.asuc.asucmobile"
@@ -18,6 +18,19 @@ android {
1818
dexOptions {
1919
javaMaxHeapSize "4g"
2020
}
21+
22+
packagingOptions {
23+
exclude 'META-INF/DEPENDENCIES'
24+
exclude 'META-INF/LICENSE'
25+
exclude 'META-INF/LICENSE.md'
26+
exclude 'META-INF/LICENSE-notice.md'
27+
exclude 'META-INF/LICENSE.txt'
28+
exclude 'META-INF/license.txt'
29+
exclude 'META-INF/NOTICE'
30+
exclude 'META-INF/NOTICE.txt'
31+
exclude 'META-INF/notice.txt'
32+
exclude 'META-INF/ASL2.0'
33+
}
2134
}
2235

2336
repositories {
@@ -27,48 +40,64 @@ repositories {
2740

2841

2942
dependencies {
30-
compile fileTree(include: ['*.jar'], dir: 'libs')
31-
compile 'mbanje.kurt:fabbutton:1.2.4@aar'
32-
compile 'com.dmitrymalkovich.android:progress-fab:1.6'
33-
compile 'com.wang.avi:library:2.1.3'
34-
compile 'com.chabbal:slidingdotsplash:1.0.2'
35-
compile 'com.android.support:multidex:1.0.1'
43+
implementation fileTree(include: ['*.jar'], dir: 'libs')
44+
implementation 'mbanje.kurt:fabbutton:1.2.4@aar'
45+
implementation 'com.dmitrymalkovich.android:progress-fab:1.6'
46+
implementation 'com.wang.avi:library:2.1.3'
47+
implementation 'com.chabbal:slidingdotsplash:1.0.2'
48+
implementation 'com.android.support:multidex:1.0.1'
3649

37-
compile 'com.google.code.gson:gson:2.8.0'
50+
implementation 'com.google.code.gson:gson:2.8.0'
3851

39-
compile 'com.google.android.gms:play-services:11.8.0'
40-
compile 'com.google.android.gms:play-services-location:11.8.0'
41-
compile 'com.crashlytics.sdk.android:crashlytics:2.9.1'
52+
implementation 'com.google.android.gms:play-services:11.8.0'
53+
implementation 'com.google.android.gms:play-services-location:11.8.0'
54+
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.1'
4255

4356

4457

45-
//compile 'com.getbase:floatingactionbutton:1.10.1'
46-
compile 'com.github.clans:fab:1.6.4'
58+
//implementation 'com.getbase:floatingactionbutton:1.10.1'
59+
implementation 'com.github.clans:fab:1.6.4'
4760

48-
compile 'com.github.bumptech.glide:glide:3.7.0'
49-
compile 'com.android.support:appcompat-v7:25.3.0'
50-
compile 'com.android.support:design:25.3.0'
51-
compile 'com.android.support:support-v4:25.3.0'
52-
compile 'com.android.support:support-v13:25.3.0'
53-
compile 'com.android.support:cardview-v7:25.3.0'
61+
implementation 'com.github.bumptech.glide:glide:3.7.0'
62+
implementation 'com.android.support:appcompat-v7:25.3.0'
63+
implementation 'com.android.support:design:25.3.0'
64+
implementation 'com.android.support:support-v4:25.3.0'
65+
implementation 'com.android.support:support-v13:25.3.0'
66+
implementation 'com.android.support:cardview-v7:25.3.0'
5467

55-
compile 'com.squareup.picasso:picasso:2.5.2'
68+
implementation 'com.squareup.picasso:picasso:2.5.2'
5669

57-
compile 'com.pushwoosh:pushwoosh:4.6.2'
58-
compile 'com.squareup.retrofit2:retrofit:2.1.0'
59-
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
70+
implementation 'com.pushwoosh:pushwoosh:4.6.2'
71+
implementation 'com.squareup.retrofit2:retrofit:2.1.0'
72+
implementation 'com.squareup.retrofit2:converter-gson:2.1.0'
6073

61-
compile 'com.jakewharton:butterknife:8.5.1'
62-
compile 'com.github.bumptech.glide:glide:3.7.0'
74+
implementation 'com.jakewharton:butterknife:8.5.1'
75+
implementation 'com.github.bumptech.glide:glide:3.7.0'
6376
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
6477

65-
compile 'com.android.support.constraint:constraint-layout:1.0.2'
78+
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
79+
80+
implementation 'noman.weekcalendar:weekcalendar:1.0.6'
81+
82+
// maps
83+
implementation 'com.google.android.gms:play-services-maps:16.0.0'
84+
implementation 'com.google.android.gms:play-services-places:16.0.0'
85+
implementation 'com.google.android.gms:play-services-location:16.0.0'
6686

67-
compile 'noman.weekcalendar:weekcalendar:1.0.6'
87+
// firebase
88+
implementation 'com.google.firebase:firebase-core:16.0.4'
89+
implementation 'com.google.firebase:firebase-firestore:17.1.1'
90+
implementation 'com.google.firebase:firebase-messaging:17.3.3'
91+
implementation 'com.firebase:firebase-jobdispatcher:0.7.0'
6892

69-
compile 'com.google.firebase:firebase-messaging:11.8.0'
70-
compile 'com.firebase:firebase-jobdispatcher:0.7.0'
93+
// dagger 2
94+
implementation 'com.google.dagger:dagger:2.17'
95+
annotationProcessor 'com.google.dagger:dagger-compiler:2.17'
7196

97+
// Required -- JUnit 4 framework
98+
testImplementation 'junit:junit:4.12'
99+
// Optional -- Mockito framework
100+
testImplementation 'org.mockito:mockito-core:1.10.19'
72101

73102
}
74103
apply plugin: 'com.google.gms.google-services'

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
android:label="@string/app_name"
4747
android:theme="@style/AppTheme"
4848
android:largeHeap="true"
49-
android:name="android.support.multidex.MultiDexApplication">
49+
android:name="com.asuc.asucmobile.GlobalApplication">
5050

5151
<meta-data
5252
android:name="com.google.android.geo.API_KEY"
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
package com.asuc.asucmobile;
2+
3+
import android.app.Application;
4+
import android.content.Context;
5+
6+
import com.asuc.asucmobile.dagger.components.DaggerRetrofitComponent;
7+
import com.asuc.asucmobile.dagger.components.RetrofitComponent;
8+
import com.asuc.asucmobile.dagger.modules.AppModule;
9+
import com.asuc.asucmobile.dagger.modules.RetrofitModule;
10+
import com.asuc.asucmobile.utilities.ServerUtils;
11+
12+
/**
13+
* Configuration for the global application
14+
*/
15+
public class GlobalApplication extends Application {
16+
17+
private static Context appContext;
18+
private static RetrofitComponent retrofitComponent;
19+
20+
@Override
21+
public void onCreate() {
22+
super.onCreate();
23+
appContext = getApplicationContext();
24+
25+
retrofitComponent = DaggerRetrofitComponent.builder()
26+
.appModule(new AppModule(this))
27+
.retrofitModule(new RetrofitModule(ServerUtils.getBaseUrl()))
28+
.build();
29+
30+
}
31+
32+
public static RetrofitComponent getRetrofitComponent() {
33+
return retrofitComponent;
34+
}
35+
36+
public static Context getAppContext() {
37+
return appContext;
38+
}
39+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
package com.asuc.asucmobile.dagger.components;
2+
3+
import com.asuc.asucmobile.services.BMService;
4+
import com.asuc.asucmobile.dagger.modules.AppModule;
5+
import com.asuc.asucmobile.dagger.modules.RetrofitModule;
6+
import com.asuc.asucmobile.fragments.FoodFragment;
7+
import com.asuc.asucmobile.fragments.GymFragment;
8+
import com.asuc.asucmobile.fragments.LibraryFragment;
9+
import com.asuc.asucmobile.fragments.ResourceFragment;
10+
11+
import javax.inject.Singleton;
12+
13+
import dagger.Component;
14+
15+
@Singleton
16+
@Component(modules = {RetrofitModule.class, AppModule.class})
17+
public interface RetrofitComponent {
18+
19+
// TODO: try a more generalized injection function
20+
21+
void inject(FoodFragment fragment);
22+
23+
void inject(LibraryFragment fragment);
24+
25+
void inject(GymFragment fragment);
26+
27+
void inject(ResourceFragment fragment);
28+
29+
// testing?
30+
31+
BMService bmapi();
32+
33+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package com.asuc.asucmobile.dagger.modules;
2+
3+
import android.app.Application;
4+
5+
import javax.inject.Singleton;
6+
7+
import dagger.Module;
8+
import dagger.Provides;
9+
10+
@Module
11+
public class AppModule {
12+
Application mApplication;
13+
14+
public AppModule(Application mApplication) {
15+
this.mApplication = mApplication;
16+
}
17+
18+
@Provides
19+
@Singleton
20+
Application provideApplication() {
21+
return mApplication;
22+
}
23+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package com.asuc.asucmobile.dagger.modules;
2+
3+
import com.google.firebase.firestore.FirebaseFirestore;
4+
5+
import javax.inject.Singleton;
6+
7+
import dagger.Module;
8+
import dagger.Provides;
9+
10+
@Module
11+
public class RepositoryModule {
12+
13+
// singleton provider for Firestore instance
14+
@Provides
15+
@Singleton
16+
public FirebaseFirestore getFirestore() {
17+
return FirebaseFirestore.getInstance();
18+
}
19+
20+
}

0 commit comments

Comments
 (0)