Skip to content

Commit

Permalink
Merge e6f099b into 397d771
Browse files Browse the repository at this point in the history
  • Loading branch information
fractalwrench committed Jul 25, 2018
2 parents 397d771 + e6f099b commit c8f4330
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 66 deletions.
2 changes: 2 additions & 0 deletions build.gradle
Expand Up @@ -3,13 +3,15 @@ buildscript {
google()
jcenter()
}
ext.kotlin_version = '1.2.30'

dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0'
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.8.2'
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.8.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
repositories {
Expand Down
3 changes: 1 addition & 2 deletions example/build.gradle
Expand Up @@ -6,7 +6,6 @@ buildscript {
}
dependencies {
classpath 'com.bugsnag:bugsnag-android-gradle-plugin:3.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$project.KOTLIN_VERSION"
}
}

Expand Down Expand Up @@ -90,7 +89,7 @@ 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:$project.KOTLIN_VERSION"
kotlinExampleImplementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"

androidTestImplementation "com.android.support.test:runner:$supportTestVersion", {
exclude group: 'com.android.support', module: 'support-annotations'
Expand Down
10 changes: 0 additions & 10 deletions mazerunner/build.gradle
Expand Up @@ -3,16 +3,6 @@ repositories {
jcenter()
}

buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$project.KOTLIN_VERSION"
}
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

Expand Down
5 changes: 5 additions & 0 deletions sdk/build.gradle
Expand Up @@ -3,6 +3,7 @@ apply plugin: 'com.getkeepsafe.dexcount'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.github.kt3k.coveralls'
apply plugin: 'kotlin-android'

repositories {
google()
Expand Down Expand Up @@ -42,6 +43,9 @@ coveralls {
}
dependencies {
api "com.android.support:support-annotations:$supportLibVersion"

androidTestImplementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"

testImplementation "junit:junit:$junitVersion"
testImplementation "org.mockito:mockito-core:$mockitoVersion"

Expand Down Expand Up @@ -166,3 +170,4 @@ dexcount {
orderByMethodCount = true
verbose true
}

54 changes: 0 additions & 54 deletions sdk/src/androidTest/java/com/bugsnag/android/BeforeNotifyTest.java

This file was deleted.

30 changes: 30 additions & 0 deletions sdk/src/androidTest/java/com/bugsnag/android/BeforeNotifyTest.kt
@@ -0,0 +1,30 @@
package com.bugsnag.android

import org.junit.Assert.assertEquals

import android.support.test.filters.SmallTest
import android.support.test.runner.AndroidJUnit4

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

@RunWith(AndroidJUnit4::class)
@SmallTest
class BeforeNotifyTest {

private val config = Configuration("api-key")

@Test
fun testRunModifiesError() {
val context = "new-context"

val beforeNotify = BeforeNotify {
it.context = context
false
}

val error = Error.Builder(config, RuntimeException("Test"), null).build()
beforeNotify.run(error)
assertEquals(context, error.context)
}
}

0 comments on commit c8f4330

Please sign in to comment.