diff --git a/.idea/.gitignore b/.idea/.gitignore index 4a443ac..5f79908 100644 --- a/.idea/.gitignore +++ b/.idea/.gitignore @@ -2,3 +2,5 @@ caches codeStyles libraries workspace.xml +androidTestResultsUserPreferences.xml +deploymentTargetDropDown.xml \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 07e93f8..d03eb16 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -46,7 +46,7 @@ - + diff --git a/build.gradle b/build.gradle index 371057a..18aaeb2 100644 --- a/build.gradle +++ b/build.gradle @@ -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' } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ff912a2..ac721e1 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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 diff --git a/usbSerialExamples/build.gradle b/usbSerialExamples/build.gradle index 7f1b57d..6b2942f 100644 --- a/usbSerialExamples/build.gradle +++ b/usbSerialExamples/build.gradle @@ -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' } diff --git a/usbSerialExamples/src/main/AndroidManifest.xml b/usbSerialExamples/src/main/AndroidManifest.xml index e0cf879..dadf831 100644 --- a/usbSerialExamples/src/main/AndroidManifest.xml +++ b/usbSerialExamples/src/main/AndroidManifest.xml @@ -1,7 +1,6 @@ + xmlns:tools="http://schemas.android.com/tools"> diff --git a/usbSerialForAndroid/build.gradle b/usbSerialForAndroid/build.gradle index 0884040..2814232 100644 --- a/usbSerialForAndroid/build.gradle +++ b/usbSerialForAndroid/build.gradle @@ -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' } } } diff --git a/usbSerialForAndroid/coverage.gradle b/usbSerialForAndroid/coverage.gradle index 76a9f15..57f9c04 100644 --- a/usbSerialForAndroid/coverage.gradle +++ b/usbSerialForAndroid/coverage.gradle @@ -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' , 'createDebugCoverageReport'*/]) { - reports { - xml.enabled = true - html.enabled = true - } - +task jacocoTestReport(type: JacocoReport, dependsOn: ['compileAnyDeviceDebugSources' + /*, 'testAnyDeviceDebugUnitTest' */ + /*, 'createDebugCoverageReport' */]) { 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' ]) } diff --git a/usbSerialForAndroid/src/androidTest/AndroidManifest.xml b/usbSerialForAndroid/src/androidTest/AndroidManifest.xml index 51ad082..d76f72e 100644 --- a/usbSerialForAndroid/src/androidTest/AndroidManifest.xml +++ b/usbSerialForAndroid/src/androidTest/AndroidManifest.xml @@ -1,6 +1,5 @@ diff --git a/usbSerialForAndroid/src/main/AndroidManifest.xml b/usbSerialForAndroid/src/main/AndroidManifest.xml index e579693..9a40236 100644 --- a/usbSerialForAndroid/src/main/AndroidManifest.xml +++ b/usbSerialForAndroid/src/main/AndroidManifest.xml @@ -1,4 +1,3 @@ - +