@@ -3,6 +3,7 @@ apply plugin: 'com.android.application'
33apply plugin : ' com.github.kt3k.coveralls'
44apply from : ' ../config/quality.gradle'
55apply from : ' ../config/translations.gradle'
6+ apply from : ' ../config/jacoco.gradle'
67
78buildscript {
89 repositories {
@@ -11,6 +12,24 @@ buildscript {
1112
1213 dependencies {
1314 classpath ' org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.0.1x'
15+ classpath ' com.android.tools.build:gradle:1.2.3'
16+ classpath ' com.jakewharton.sdkmanager:gradle-plugin:0.12.0'
17+ }
18+ }
19+
20+ repositories {
21+ maven {
22+ url ' https://dl.bintray.com/connectbot/maven'
23+ }
24+ }
25+
26+ dependencies {
27+ compile ' org.connectbot:sshlib:2.2.0'
28+
29+ testCompile ' junit:junit:4.12'
30+ testCompile(' org.robolectric:robolectric:3.0' ) {
31+ exclude group : ' commons-logging' , module : ' commons-logging'
32+ exclude group : ' org.apache.httpcomponents' , module : ' httpclient'
1433 }
1534}
1635
@@ -22,10 +41,6 @@ android {
2241 applicationId " org.connectbot"
2342 minSdkVersion 4
2443 targetSdkVersion 22
25- compileOptions {
26- sourceCompatibility JavaVersion . VERSION_1_5
27- targetCompatibility JavaVersion . VERSION_1_5
28- }
2944
3045 ndk {
3146 moduleName " com_google_ase_Exec"
@@ -46,7 +61,7 @@ android {
4661 }
4762
4863 dependencies {
49- compile " com.android.support:support-v4:22.2.+ "
64+ compile " com.android.support:support-v4:22.2.1 "
5065 }
5166
5267 buildTypes {
@@ -66,56 +81,6 @@ android {
6681 }
6782}
6883
69- apply plugin : ' jacoco'
70-
71- // By default, Android Gradle plugin uses JaCoCo version 0.7.1, which works great in JUnit on the JVM.
72- // But that will fail on Android Lollipop/ART runtime, which requires 0.7.3 or higher.
73- if (rootProject. hasProperty(' jacocoVersion' )) {
74- android. jacoco. version = rootProject. property(' jacocoVersion' )
75- jacoco. toolVersion = rootProject. property(' jacocoVersion' )
76- } else {
77- println " Using the default JaCoCo version of: ${ jacoco.toolVersion} "
78- }
79-
80- // The built-in jacoco plugin automatically applies itself to all Test tasks
81- tasks. withType(Test ). whenTaskAdded {
82- it. jacoco. append = false
83- it. jacoco. classDumpFile = file(" ${ project.buildDir} /jacoco/dump" )
84- }
85-
86- // These tasks are for generating the coverage report after JUnit+robolectric tests have executed
87- tasks. create(name : " jacocoTestDebugReport" , type : JacocoReport , dependsOn : " testDebug" ) {
88- group = " Reporting"
89- description = " Generate Jacoco coverage reports"
90-
91- classDirectories = fileTree(
92- dir : " ${ project.buildDir} /intermediates/classes/debug/" ,
93- excludes : [' **/R.class' ,
94- ' **/R$*.class' ,
95- ' **/*$ViewInjector*.*' ,
96- ' **/BuildConfig.*' ,
97- ' **/Manifest*.*' ]
98- )
99-
100- sourceDirectories = files(" src/main/java" , " src/debug/java" )
101- executionData = files(" ${ project.buildDir} /jacoco/testDebug.exec" )
102-
103- reports {
104- xml. enabled = true
105- html. enabled = true
106- }
107- }
108-
109- coveralls. jacocoReportPath = " ${ project.buildDir} /reports/jacoco/jacocoTestDebugReport/jacocoTestDebugReport.xml"
110-
111- dependencies {
112- testCompile ' junit:junit:4.12'
113- testCompile(' org.robolectric:robolectric:3.0' ) {
114- exclude group : ' commons-logging' , module : ' commons-logging'
115- exclude group : ' org.apache.httpcomponents' , module : ' httpclient'
116- }
117- }
118-
11984if (project. hasProperty(' keystorePassword' )) {
12085 android. signingConfigs. release. storeFile file(keystoreFile)
12186 android. signingConfigs. release. storePassword keystorePassword
0 commit comments