mirror of
https://github.com/mik3y/usb-serial-for-android
synced 2025-06-07 07:56:20 +00:00
gradle update, coverage working again
This commit is contained in:
parent
8d3326ed66
commit
fbe64fe4be
2
.idea/.gitignore
generated
vendored
2
.idea/.gitignore
generated
vendored
@ -2,3 +2,5 @@ caches
|
||||
codeStyles
|
||||
libraries
|
||||
workspace.xml
|
||||
androidTestResultsUserPreferences.xml
|
||||
deploymentTargetDropDown.xml
|
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@ -46,7 +46,7 @@
|
||||
</value>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
@ -6,7 +6,7 @@ buildscript {
|
||||
google()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.0.4'
|
||||
classpath 'com.android.tools.build:gradle:7.4.2'
|
||||
}
|
||||
}
|
||||
|
||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
|
||||
|
@ -23,10 +23,11 @@ android {
|
||||
minifyEnabled true
|
||||
}
|
||||
}
|
||||
namespace 'com.hoho.android.usbserial.examples'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(':usbSerialForAndroid')
|
||||
implementation 'androidx.appcompat:appcompat:1.4.1'
|
||||
implementation 'com.google.android.material:material:1.5.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.5.1'
|
||||
implementation 'com.google.android.material:material:1.8.0'
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.hoho.android.usbserial.examples">
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<!-- mipmap/ic_launcher created with Android Studio -> New -> Image Asset using @color/colorPrimary and USB clip art -->
|
||||
<application
|
||||
@ -15,7 +14,6 @@
|
||||
when the settings activity is currently shown -->
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:label="@string/app_name"
|
||||
android:launchMode="singleTask"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize"
|
||||
android:exported="true">
|
||||
|
@ -13,7 +13,7 @@ android {
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
testInstrumentationRunnerArguments = [ // Raspi Windows LinuxVM ...
|
||||
'rfc2217_server_host': '192.168.0.186',
|
||||
'rfc2217_server_host': '192.168.0.144',
|
||||
'rfc2217_server_nonstandard_baudrates': 'true', // true false false
|
||||
]
|
||||
}
|
||||
@ -21,14 +21,16 @@ android {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
namespace 'com.hoho.android.usbserial'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "androidx.annotation:annotation:1.3.0"
|
||||
implementation 'androidx.test:core:1.4.0'
|
||||
implementation "androidx.annotation:annotation:1.5.0"
|
||||
//testImplementation 'androidx.test:core:1.5.0'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
testImplementation 'org.mockito:mockito-core:1.10.19'
|
||||
androidTestImplementation 'androidx.test:runner:1.4.0'
|
||||
androidTestImplementation 'androidx.test:core:1.5.0'
|
||||
androidTestImplementation 'androidx.test:runner:1.5.2'
|
||||
androidTestImplementation 'commons-net:commons-net:3.8.0'
|
||||
androidTestImplementation 'org.apache.commons:commons-lang3:3.11'
|
||||
}
|
||||
@ -38,13 +40,13 @@ project.afterEvaluate {
|
||||
publishing {
|
||||
publications {
|
||||
release(MavenPublication) {
|
||||
from components.release // change to anyDeviceRelease if coverage is enabled
|
||||
from components.release // change 'release' to 'anyDeviceRelease' if coverage is enabled
|
||||
artifact androidSourcesJar
|
||||
|
||||
// values used for local maven repo, jitpack uses github release:
|
||||
groupId 'com.github.mik3y'
|
||||
artifactId 'usb-serial-for-android'
|
||||
version 'v3.5.0beta'
|
||||
version '3.5.0beta'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -48,7 +48,8 @@ android {
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
testCoverageEnabled true // disable for testAnyDeviceDebugUnitTest
|
||||
enableUnitTestCoverage true
|
||||
enableAndroidTestCoverage true
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -60,20 +61,18 @@ project.gradle.taskGraph.whenReady {
|
||||
}
|
||||
}
|
||||
|
||||
task jacocoTestReport(type: JacocoReport ,
|
||||
dependsOn: ['compileAnyDeviceDebugSources' /*'testAnyDeviceDebugUnitTest' , 'create<device>DebugCoverageReport'*/]) {
|
||||
reports {
|
||||
xml.enabled = true
|
||||
html.enabled = true
|
||||
}
|
||||
|
||||
task jacocoTestReport(type: JacocoReport, dependsOn: ['compileAnyDeviceDebugSources'
|
||||
/*, 'testAnyDeviceDebugUnitTest' */
|
||||
/*, 'create<device>DebugCoverageReport' */]) {
|
||||
def fileFilter = ['**/R.class', '**/R$*.class', '**/BuildConfig.*', '**/Manifest*.*', '**/*Test*.*', 'android/**/*.*']
|
||||
def debugTree = fileTree(dir: "$project.buildDir/intermediates/javac/anyDeviceDebug", excludes: fileFilter)
|
||||
def mainSrc = "$project.projectDir/src/main/java"
|
||||
|
||||
reports.xml.required = true
|
||||
sourceDirectories.from files([mainSrc])
|
||||
classDirectories.from files([debugTree])
|
||||
executionData.from fileTree(dir: project.buildDir, includes: [
|
||||
'jacoco/testAnyDeviceDebugUnitTest.exec', 'outputs/code_coverage/*AndroidTest/connected/*.ec'
|
||||
'outputs/unit_test_code_coverage/anyDeviceDebugUnitTest/testAnyDeviceDebugUnitTest.exec',
|
||||
'outputs/code_coverage/*DebugAndroidTest/connected/*/coverage.ec'
|
||||
])
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.hoho.android.usbserial"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
|
@ -1,4 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.hoho.android.usbserial">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
</manifest>
|
||||
|
Loading…
x
Reference in New Issue
Block a user