Skip to content

Instantly share code, notes, and snippets.

@adamski
Created October 21, 2016 22:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamski/c4da6d390142ce5a6c0e95286c248922 to your computer and use it in GitHub Desktop.
Save adamski/c4da6d390142ce5a6c0e95286c248922 to your computer and use it in GitHub Desktop.
react-native-navigation experimental format build.gradle
apply plugin: 'com.android.model.library'
model {
android {
compileSdkVersion = 23
buildToolsVersion = "23.0.1"
defaultConfig.with {
minSdkVersion.apiLevel = 16
targetSdkVersion.apiLevel = 22
versionCode = 1
versionName = "1.0"
}
defaultPublishConfig = 'release'
publishNonDefault = true
}
android.buildTypes {
release {
minifyEnabled = false
}
debug {
minifyEnabled = false
}
}
android.lintOptions {
abortOnError = false
}
android.testOptions {
unitTests.all { t ->
reports {
html.enabled true
}
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
}
afterSuite { desc, result ->
if (!desc.parent) { // will match the outermost suite
def output = " ${result.resultType} (${result.successfulTestCount} successes, ${result.failedTestCount} failures, ${result.skippedTestCount} skipped) "
def repeatLength = output.length()
println '\n' + ('-' * repeatLength) + '\n' + output + '\n' + ('-' * repeatLength) + '\n'
println "see report at file://${t.reports.html.destination}/index.html"
}
}
}
}
}
dependencies {
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.3.0"
compile 'com.android.support:design:23.3.0'
// node_modules
compile "com.facebook.react:react-native:+"
// third party
compile "com.aurelhubert:ahbottomnavigation:1.3.3"
compile 'com.balysv.materialmenu:material-menu-toolbar:1.5.4'
// tests
testCompile "junit:junit:4.12"
testCompile "org.robolectric:robolectric:3.1.1"
testCompile 'org.assertj:assertj-core:3.5.2'
}
task unit(dependsOn: 'testLibraryDebugUnitTest') << {
println 'Finished running unit all tests'
println 'report at file://' + tasks.testLibraryDebugUnitTest.outputs.files.last().absolutePath + '/index.html'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment