Skip to content

Commit a09a6b3

Browse files
DavidMina96HeshamMegid
authored andcommitted
[MOB-11797] Bootstrap Example (#339)
General refactoring prior to the upcoming PR revamping the example app.
1 parent 3d5101d commit a09a6b3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+433
-176
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ ios/**/Generated/
3434
.packages
3535
.pub-cache/
3636
.pub/
37-
pubspec.lock
37+
/pubspec.lock
3838
build/
3939
coverage/
4040

example/README.md

Lines changed: 5 additions & 5 deletions

example/android/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ GeneratedPluginRegistrant.java
88

99
# Remember to never publicly share your keystore.
1010
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11-
key.properties
11+
key.properties

example/android/app/build.gradle

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ apply plugin: 'kotlin-android'
2626
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2727

2828
android {
29-
compileSdkVersion 31
29+
compileSdkVersion flutter.compileSdkVersion
30+
ndkVersion flutter.ndkVersion
3031

3132
compileOptions {
3233
sourceCompatibility JavaVersion.VERSION_1_8
@@ -41,13 +42,8 @@ android {
4142
main.java.srcDirs += 'src/main/kotlin'
4243
}
4344

44-
lintOptions {
45-
disable 'InvalidPackage'
46-
}
47-
4845
defaultConfig {
49-
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
50-
applicationId "com.example.InstabugSample"
46+
applicationId "com.instabug.flutter.example"
5147
minSdkVersion 18
5248
targetSdkVersion 30
5349
versionCode flutterVersionCode.toInteger()
@@ -74,13 +70,13 @@ flutter {
7470
}
7571

7672
dependencies {
77-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
78-
testImplementation 'junit:junit:4.12'
79-
implementation 'com.android.support:multidex:1.0.3'
8073
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
8174
androidTestImplementation 'androidx.test:rules:1.1.0'
8275
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
8376
androidTestImplementation 'com.android.support.test.uiautomator:uiautomator:2.1.3'
84-
testImplementation 'org.mockito:mockito-core:1.10.19'
77+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
78+
implementation 'com.android.support:multidex:1.0.3'
8579
implementation 'org.mockito:mockito-core:1.10.19'
80+
testImplementation 'junit:junit:4.12'
81+
testImplementation 'org.mockito:mockito-core:1.10.19'
8682
}

example/android/app/src/androidTest/java/com/example/InstabugSample/BugReportingUITest.java renamed to example/android/app/src/androidTest/java/com/instabug/flutter/example/BugReportingUITest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.example.InstabugSample;
1+
package com.instabug.flutter.example;
22

33
import androidx.test.espresso.action.ViewActions;
44
import androidx.test.espresso.flutter.action.FlutterActions;
@@ -23,15 +23,15 @@
2323
import static androidx.test.espresso.flutter.EspressoFlutter.onFlutterWidget;
2424
import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
2525

26-
import static com.example.InstabugSample.util.InstabugAssertions.assertViewWillBeVisible;
27-
import static com.example.InstabugSample.util.InstabugViewMatchers.isToTheLeft;
26+
import static com.instabug.flutter.example.util.InstabugAssertions.assertViewWillBeVisible;
27+
import static com.instabug.flutter.example.util.InstabugViewMatchers.isToTheLeft;
2828

2929
import static org.junit.Assert.assertTrue;
3030

3131
import android.app.Instrumentation;
3232
import android.graphics.Point;
3333

34-
import com.example.InstabugSample.util.Keyboard;
34+
import com.instabug.flutter.example.util.Keyboard;
3535

3636
@RunWith(AndroidJUnit4.class)
3737
public class BugReportingUITest {

example/android/app/src/androidTest/java/com/example/InstabugSample/FeatureRequestsUITest.java renamed to example/android/app/src/androidTest/java/com/instabug/flutter/example/FeatureRequestsUITest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.example.InstabugSample;
1+
package com.instabug.flutter.example;
22

33
import static androidx.test.espresso.Espresso.onView;
44
import static androidx.test.espresso.assertion.ViewAssertions.matches;

example/android/app/src/androidTest/java/com/example/InstabugSample/InstabugUITest.java renamed to example/android/app/src/androidTest/java/com/instabug/flutter/example/InstabugUITest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
package com.example.InstabugSample;
1+
package com.instabug.flutter.example;
22

33
import static androidx.test.espresso.Espresso.onView;
44
import static androidx.test.espresso.assertion.ViewAssertions.matches;
55
import static androidx.test.espresso.flutter.EspressoFlutter.onFlutterWidget;
66

7-
import static com.example.InstabugSample.util.InstabugViewMatchers.hasBackgroundColor;
7+
import static com.instabug.flutter.example.util.InstabugViewMatchers.hasBackgroundColor;
88

99
import android.graphics.Color;
1010

@@ -14,7 +14,7 @@
1414
import androidx.test.ext.junit.runners.AndroidJUnit4;
1515
import androidx.test.rule.ActivityTestRule;
1616

17-
import com.example.InstabugSample.util.Keyboard;
17+
import com.instabug.flutter.example.util.Keyboard;
1818

1919
import org.junit.Rule;
2020
import org.junit.Test;

example/android/app/src/androidTest/java/com/example/InstabugSample/SurveysUITest.java renamed to example/android/app/src/androidTest/java/com/instabug/flutter/example/SurveysUITest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package com.example.InstabugSample;
1+
package com.instabug.flutter.example;
22

33
import static androidx.test.espresso.flutter.EspressoFlutter.onFlutterWidget;
44

5-
import static com.example.InstabugSample.util.InstabugAssertions.assertViewWillBeVisible;
5+
import static com.instabug.flutter.example.util.InstabugAssertions.assertViewWillBeVisible;
66

77
import androidx.test.espresso.flutter.action.FlutterActions;
88
import androidx.test.espresso.flutter.matcher.FlutterMatchers;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.example.InstabugSample.util;
1+
package com.instabug.flutter.example.util;
22

33
import android.graphics.Bitmap;
44
import android.graphics.Canvas;

example/android/app/src/androidTest/java/com/example/InstabugSample/util/InstabugAssertions.java renamed to example/android/app/src/androidTest/java/com/instabug/flutter/example/util/InstabugAssertions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.example.InstabugSample.util;
1+
package com.instabug.flutter.example.util;
22

33
import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
44
import static org.junit.Assert.assertTrue;

0 commit comments

Comments
 (0)