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