add .cxx to gitignore; remove gradle wrapper properties from android/ folder; ad…
…d testoptions for Android project
Showing
3 changed files
with
22 additions
and
9 deletions
| @@ -14,7 +14,7 @@ buildscript { | @@ -14,7 +14,7 @@ buildscript { | ||
| 14 | } | 14 | } |
| 15 | } | 15 | } |
| 16 | 16 | ||
| 17 | -rootProject.allprojects { | 17 | +allprojects { |
| 18 | repositories { | 18 | repositories { |
| 19 | google() | 19 | google() |
| 20 | mavenCentral() | 20 | mavenCentral() |
| @@ -25,6 +25,10 @@ apply plugin: 'com.android.library' | @@ -25,6 +25,10 @@ apply plugin: 'com.android.library' | ||
| 25 | apply plugin: 'kotlin-android' | 25 | apply plugin: 'kotlin-android' |
| 26 | 26 | ||
| 27 | android { | 27 | android { |
| 28 | + if (project.android.hasProperty("namespace")) { | ||
| 29 | + namespace 'dev.steenbakker.mobile_scanner' | ||
| 30 | + } | ||
| 31 | + | ||
| 28 | compileSdkVersion 33 | 32 | compileSdkVersion 33 |
| 29 | 33 | ||
| 30 | compileOptions { | 34 | compileOptions { |
| @@ -38,13 +42,12 @@ android { | @@ -38,13 +42,12 @@ android { | ||
| 38 | 42 | ||
| 39 | sourceSets { | 43 | sourceSets { |
| 40 | main.java.srcDirs += 'src/main/kotlin' | 44 | main.java.srcDirs += 'src/main/kotlin' |
| 45 | + test.java.srcDirs += 'src/test/kotlin' | ||
| 41 | } | 46 | } |
| 42 | 47 | ||
| 43 | defaultConfig { | 48 | defaultConfig { |
| 44 | minSdkVersion 21 | 49 | minSdkVersion 21 |
| 45 | } | 50 | } |
| 46 | - | ||
| 47 | - namespace 'dev.steenbakker.mobile_scanner' | ||
| 48 | } | 51 | } |
| 49 | 52 | ||
| 50 | dependencies { | 53 | dependencies { |
| @@ -62,4 +65,19 @@ dependencies { | @@ -62,4 +65,19 @@ dependencies { | ||
| 62 | implementation 'androidx.camera:camera-camera2:1.2.3' | 65 | implementation 'androidx.camera:camera-camera2:1.2.3' |
| 63 | implementation 'androidx.camera:camera-lifecycle:1.2.3' | 66 | implementation 'androidx.camera:camera-lifecycle:1.2.3' |
| 64 | implementation 'androidx.camera:camera-camera2:1.2.3' | 67 | implementation 'androidx.camera:camera-camera2:1.2.3' |
| 68 | + | ||
| 69 | + testImplementation 'org.jetbrains.kotlin:kotlin-test' | ||
| 70 | + testImplementation 'org.mockito:mockito-core:5.0.0' | ||
| 71 | +} | ||
| 72 | + | ||
| 73 | +testOptions { | ||
| 74 | + unitTests.all { | ||
| 75 | + useJUnitPlatform() | ||
| 76 | + | ||
| 77 | + testLogging { | ||
| 78 | + events "passed", "skipped", "failed", "standardOut", "standardError" | ||
| 79 | + outputs.upToDateWhen {false} | ||
| 80 | + showStandardStreams = true | ||
| 81 | + } | ||
| 82 | + } | ||
| 65 | } | 83 | } |
-
Please register or login to post a comment