This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jobs: | |
| android: | |
| name: android | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Clone repo | |
| uses: actions/checkout@v2 | |
| - name: Set up JDK 11 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // gradle plugin has jacoco that you can use to make your life easier without the | |
| // hassle of manually import and ensure the compatibility | |
| apply plugin: 'jacoco' | |
| jacoco { | |
| // if you are using java 11 then jacoco version that support it is v0.8.7 | |
| toolVersion = "0.8.7" | |
| // this is where you find html/xml/csv report for your unit test coverage check | |
| reportsDirectory = file("$buildDir/reports/coverage") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @override | |
| _i3.Future<String> getDoc(String? id) => (super.noSuchMethod( | |
| Invocation.method( | |
| #getDoc, | |
| [id], | |
| ), | |
| returnValue: _i3.Future<String>.value(''), | |
| returnValueForMissingStub: _i3.Future<String>.value(''), | |
| ) as _i3.Future<String>); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @override | |
| _i3.Future<String> getDoc(String? id) => (super.noSuchMethod( | |
| Invocation.method( | |
| #getDoc, | |
| [id], | |
| ), | |
| returnValue: _i3.Future<String>.value(''), | |
| ) as _i3.Future<String>); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ReadScreen extends StatefulWidget { | |
| final String bookId; | |
| final LibraryService libraryService; | |
| const ReadScreen({ | |
| Key? key, | |
| required this.bookId, | |
| this.libraryService = const LibraryService(), | |
| }) : super(key: key); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| task jacocoTestCoverageVerification(type: JacocoCoverageVerification, dependsOn: ['testDebugUnitTest', 'createDebugCoverageReport']) { | |
| group = "Verification" | |
| description = "Check code coverage" | |
| onlyIf = { | |
| true | |
| } | |
| violationRules { | |
| rule { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apply plugin: 'jacoco' | |
| android { | |
| debug { | |
| // this line will add new task createDebugCoverageReport that needed by jacoco | |
| // however as default it will generate coverage for androidTest | |
| // it does not generate coverage for unitTest | |
| testCoverageEnabled true | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| buildscript { | |
| ext.jacocoVersion = '0.8.7' | |
| repositories { | |
| google() | |
| jcenter() | |
| } | |
| dependencies { | |
| classpath "org.jacoco:org.jacoco.core:$jacocoVersion" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class IronManMk1Debug { | |
| fun shoot() { | |
| println("jarvis: target destroyed") | |
| } | |
| fun getRepulsorsStatus() { | |
| println("jarvis: repulsors no power") | |
| } | |
| val repulsorsStatus = println("jarvis: repulsors no power") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class IronManMk2 { | |
| fun getRepulsorsStatus() { | |
| println("jarvis: ready power 100") | |
| } | |
| val repulsorsStatus get() = println("jarvis: ready power 90") | |
| } |
NewerOlder