Navaron Bracke

add .cxx to gitignore; remove gradle wrapper properties from android/ folder; ad…

…d testoptions for Android project
@@ -6,3 +6,4 @@ @@ -6,3 +6,4 @@
6 .DS_Store 6 .DS_Store
7 /build 7 /build
8 /captures 8 /captures
  9 +.cxx
@@ -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 }
1 -#Fri Jun 23 08:50:38 CEST 2017  
2 -distributionBase=GRADLE_USER_HOME  
3 -distributionPath=wrapper/dists  
4 -zipStoreBase=GRADLE_USER_HOME  
5 -zipStorePath=wrapper/dists  
6 -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip