From 7daa2938e0d8fd9329c2ad1ee3e2d1f6ad5323d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomek=20Pola=C5=84ski?= Date: Tue, 10 Jan 2017 16:51:46 +0100 Subject: [PATCH] Travis fix (#16) Fixing travis and adding code coverage --- .travis.yml | 7 +++++-- README.md | 1 + options/core/build.gradle | 16 +++++++++++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5e73d0a..8b629cf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,9 +6,12 @@ android: - platform-tools - build-tools-23.0.1 - android-23 + - extra-android-m2repository + - extra-google-m2repository script: - - ./options/gradlew build + - cd options + - ./gradlew build check after_success: - - bash <(curl -s https://codecov.io/bash) \ No newline at end of file + - bash <(curl -s https://codecov.io/bash) diff --git a/README.md b/README.md index f194bca..0c117d5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Options [![Build Status](https://travis-ci.org/tomaszpolanski/Options.svg?branch=master)](https://travis-ci.org/tomaszpolanski/Options) +[![codecov.io](http://codecov.io/github/tomaszpolanski/Options/coverage.svg?branch=master)](http://codecov.io/github/tomaszpolanski/Options?branch=master) [![Method count](https://img.shields.io/badge/Methods and size-core: 118 | deps: 20 | 16 KB-e91e63.svg)](http://www.methodscount.com/?lib=com.github.tomaszpolanski%3Aoptions%3A1.2.0) [Functional Option](https://en.wikipedia.org/wiki/Option_type) that can be used with Java 1.7 and Android. diff --git a/options/core/build.gradle b/options/core/build.gradle index c00500b..067b4f7 100644 --- a/options/core/build.gradle +++ b/options/core/build.gradle @@ -1,12 +1,26 @@ apply plugin: 'java' apply plugin: 'kotlin' +apply plugin: 'jacoco' group = 'com.github.tomaszpolanski' +jacocoTestReport { + reports { + xml.enabled = true + html.enabled = true + } +} + +check.dependsOn jacocoTestReport + buildscript { ext.kotlin_version = '1.0.1-2' repositories { + mavenLocal() + mavenCentral() jcenter() + + maven { url "http://repo1.maven.org/maven2/" } } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.0.1-2" @@ -56,4 +70,4 @@ task javadocJar(type: Jar, dependsOn: javadoc) { artifacts { archives sourcesJar archives javadocJar -} \ No newline at end of file +}