Skip to content

Commit

Permalink
Move example projects into a subdirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
kattrali committed Aug 22, 2018
1 parent 2b17110 commit 04b8ebb
Show file tree
Hide file tree
Showing 44 changed files with 25 additions and 21 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Expand Up @@ -45,7 +45,9 @@ before_script:
- while [[ `adb shell pm path android` == 'Error'* ]]; do sleep 2; done
- adb shell input keyevent 82 &

script: ./gradlew lint checkstyle createDebugCoverageReport coveralls
script:
- ./gradlew lint checkstyle createDebugCoverageReport coveralls
- cd examples/sdk-app-example && ../../gradlew lint checkstyle connectedCheck

sudo: false

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Expand Up @@ -98,7 +98,7 @@ Building the Example App
You can build and install the example app to as follows:

```shell
./gradlew clean example:installJavaExampleDebug
cd examples/sdk-app-example && ../../gradlew clean installJavaExampleDebug
```

This builds the latest version of the library and installs an app onto your
Expand Down
File renamed without changes.
File renamed without changes.
27 changes: 14 additions & 13 deletions example/build.gradle → examples/sdk-app-example/build.gradle
Expand Up @@ -2,10 +2,11 @@ buildscript {
repositories {
google()
jcenter()
mavenLocal()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.bugsnag:bugsnag-android-gradle-plugin:3.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.30"
}
}

Expand All @@ -19,12 +20,12 @@ repositories {

android {

compileSdkVersion Integer.parseInt(project.ANDROID_COMPILE_SDK_VERSION)
buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION
compileSdkVersion 27
buildToolsVersion "27.0.0"

defaultConfig {
minSdkVersion Integer.parseInt(project.ANDROID_MIN_SDK_VERSION)
targetSdkVersion Integer.parseInt(project.ANDROID_TARGET_SDK_VERSION)
minSdkVersion 14
targetSdkVersion 27

manifestPlaceholders = [
bugsnagApiKey : "your-api-key",
Expand Down Expand Up @@ -86,18 +87,18 @@ android {
}

dependencies {
implementation project(":sdk")
implementation "com.android.support:appcompat-v7:$supportLibVersion"
implementation "com.android.support:support-v4:$supportLibVersion"
kotlinExampleImplementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation "com.bugsnag:bugsnag-android:4.6.1"
implementation "com.android.support:appcompat-v7:27.0.0"
implementation "com.android.support:support-v4:27.0.0"
kotlinExampleImplementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:1.2.30"

androidTestImplementation "com.android.support.test:runner:$supportTestVersion", {
androidTestImplementation "com.android.support.test:runner:0.5", {
exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestImplementation "com.android.support.test:rules:$supportTestVersion", {
androidTestImplementation "com.android.support.test:rules:0.5", {
exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestImplementation "com.android.support.test.espresso:espresso-core:$espressoVersion", {
androidTestImplementation "com.android.support.test.espresso:espresso-core:2.2.2", {
exclude group: 'com.android.support', module: 'support-annotations'
}
}
Expand All @@ -110,7 +111,7 @@ checkstyle {
toolVersion = "6.16"
}
task("checkstyle", type: Checkstyle) {
configFile rootProject.file("config/checkstyle/checkstyle.xml")
configFile rootProject.file("../../config/checkstyle/checkstyle.xml")
source "src/javaExample/java"
include "**/*.java"
classpath = files()
Expand Down
File renamed without changes.
Expand Up @@ -54,11 +54,11 @@ public void beforeNotify(Report report) {
assertNotNull(report);
JSONObject json = getJson(report);

assertEquals(3, json.length());
assertEquals(4, json.length());

JSONObject event = json.getJSONArray("events").getJSONObject(0);
assertNotNull(event);
assertEquals("com.bugsnag.android.example.ExampleActivity", event.getString("context"));
assertEquals("ExampleActivity", event.getString("context"));

JSONArray exceptions = event.getJSONArray("exceptions");
assertEquals(1, exceptions.length());
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -7,16 +7,17 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.bugsnag:bugsnag-android-gradle-plugin:3.1.0'
}
}

android {
compileSdkVersion Integer.parseInt(project.ANDROID_COMPILE_SDK_VERSION)
buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION
compileSdkVersion 27
buildToolsVersion "27.0.0"

defaultConfig {
minSdkVersion Integer.parseInt(project.ANDROID_MIN_SDK_VERSION)
minSdkVersion 14
}

buildTypes {
Expand All @@ -28,4 +29,4 @@ android {
}

apply plugin: 'com.bugsnag.android.gradle'
apply from: "../checkstyle.gradle"
apply from: "../../checkstyle.gradle"
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 04b8ebb

Please sign in to comment.