diff --git a/acuantcamera/build.gradle b/acuantcamera/build.gradle index 019dafa..7cd8e3b 100644 --- a/acuantcamera/build.gradle +++ b/acuantcamera/build.gradle @@ -30,6 +30,18 @@ android { buildFeatures { viewBinding true } + + +// publishing { +// publications { +// mavenJava(MavenPublication) { +// groupId = 'com.github.hrayr09amiraghyan' +// artifactId = 'acuantcamera' +// version = '1.5.7' +// } +// } +// } + } dependencies { // Kotlin lang @@ -54,4 +66,5 @@ dependencies { implementation 'com.rmtheis:tess-two:9.1.0' implementation 'com.acuant:acuantcommon:11.5.4' implementation 'com.acuant:acuantimagepreparation:11.5.4' + } diff --git a/acuantcamera/src/main/java/com/acuant/acuantcamera/camera/AcuantCameraActivity.kt b/acuantcamera/src/main/java/com/acuant/acuantcamera/camera/AcuantCameraActivity.kt index 98372a2..da40f58 100644 --- a/acuantcamera/src/main/java/com/acuant/acuantcamera/camera/AcuantCameraActivity.kt +++ b/acuantcamera/src/main/java/com/acuant/acuantcamera/camera/AcuantCameraActivity.kt @@ -13,17 +13,16 @@ import com.acuant.acuantcamera.interfaces.ICameraActivityFinish import com.acuant.acuantcamera.constant.* import com.acuant.acuantcamera.databinding.ActivityCameraBinding import com.acuant.acuantcamera.helper.MrzResult +import com.acuant.acuantcamera.language.LocaleManager import com.acuant.acuantcommon.model.AcuantError +import java.util.* -class AcuantCameraActivity: AppCompatActivity(), ICameraActivityFinish { +class AcuantCameraActivity : AppCompatActivity(), ICameraActivityFinish { private lateinit var binding: ActivityCameraBinding //Camera Launch override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - binding = ActivityCameraBinding.inflate(layoutInflater) - val unserializedOptions = intent.getSerializableExtra(ACUANT_EXTRA_CAMERA_OPTIONS) val options: AcuantCameraOptions = if (unserializedOptions == null) { @@ -31,9 +30,14 @@ class AcuantCameraActivity: AppCompatActivity(), ICameraActivityFinish { } else { unserializedOptions as AcuantCameraOptions } - + LocaleManager.updateResources(this, Locale(options.language)) + super.onCreate(savedInstanceState) + binding = ActivityCameraBinding.inflate(layoutInflater) if (options.preventScreenshots) { - window.setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE) + window.setFlags( + WindowManager.LayoutParams.FLAG_SECURE, + WindowManager.LayoutParams.FLAG_SECURE + ) } setContentView(binding.root) diff --git a/acuantcamera/src/main/java/com/acuant/acuantcamera/camera/AcuantCameraOptions.kt b/acuantcamera/src/main/java/com/acuant/acuantcamera/camera/AcuantCameraOptions.kt index 7bd3b87..efdf574 100644 --- a/acuantcamera/src/main/java/com/acuant/acuantcamera/camera/AcuantCameraOptions.kt +++ b/acuantcamera/src/main/java/com/acuant/acuantcamera/camera/AcuantCameraOptions.kt @@ -14,29 +14,30 @@ import java.io.Serializable //todo this should be refactored into a base class and extensions when allowed to break backwards compatibility open class AcuantCameraOptions internal constructor( - internal val timeInMsPerDigit: Int = 900, - internal val digitsToShow: Int = 2, - internal val allowBox : Boolean = true, - internal val autoCapture : Boolean = true, - internal val bracketLengthInHorizontal : Int = 155, - internal val bracketLengthInVertical : Int = 255, - internal val defaultBracketMarginWidth : Int = 160, - internal val defaultBracketMarginHeight : Int = 160, - internal val colorHold : Int = Color.YELLOW, - internal val colorCapturing : Int = Color.GREEN, - internal val colorBracketAlign : Int = Color.BLACK, - internal val colorBracketCloser : Int = Color.RED, - internal val colorBracketHold : Int = Color.YELLOW, - internal val colorBracketCapturing : Int = Color.GREEN, - internal val cardRatio : Float = 0.65f, - internal val preventScreenshots : Boolean = true, - internal val cameraMode: CameraMode = CameraMode.Document, - internal val zoomType: ZoomType = ZoomType.Generic + internal val timeInMsPerDigit: Int = 900, + internal val digitsToShow: Int = 2, + internal val allowBox: Boolean = true, + internal val autoCapture: Boolean = true, + internal val bracketLengthInHorizontal: Int = 155, + internal val bracketLengthInVertical: Int = 255, + internal val defaultBracketMarginWidth: Int = 160, + internal val defaultBracketMarginHeight: Int = 160, + internal val colorHold: Int = Color.YELLOW, + internal val colorCapturing: Int = Color.GREEN, + internal val colorBracketAlign: Int = Color.BLACK, + internal val colorBracketCloser: Int = Color.RED, + internal val colorBracketHold: Int = Color.YELLOW, + internal val colorBracketCapturing: Int = Color.GREEN, + internal val cardRatio: Float = 0.65f, + internal val preventScreenshots: Boolean = true, + internal val cameraMode: CameraMode = CameraMode.Document, + internal val zoomType: ZoomType = ZoomType.Generic, + internal val language: String = "en" ) : Serializable { - enum class CameraMode {Document, Mrz, BarcodeOnly} + enum class CameraMode { Document, Mrz, BarcodeOnly } - enum class ZoomType {Generic, IdOnly} + enum class ZoomType { Generic, IdOnly } companion object { const val DEFAULT_TIMEOUT_BARCODE = 20000 @@ -47,99 +48,105 @@ internal constructor( class DocumentCameraOptionsBuilder { private var timeInMsPerDigit: Int = 900 private var digitsToShow: Int = 2 - private var allowBox : Boolean = true - private var autoCapture : Boolean = true - private var bracketLengthInHorizontal : Int = 155 - private var bracketLengthInVertical : Int = 255 - private var defaultBracketMarginWidth : Int = 160 - private var defaultBracketMarginHeight : Int = 160 - private var colorHold : Int = Color.YELLOW - private var colorCapturing : Int = Color.GREEN - private var colorBracketAlign : Int = Color.BLACK - private var colorBracketCloser : Int = Color.RED - private var colorBracketHold : Int = Color.YELLOW - private var colorBracketCapturing : Int = Color.GREEN + private var allowBox: Boolean = true + private var autoCapture: Boolean = true + private var bracketLengthInHorizontal: Int = 155 + private var bracketLengthInVertical: Int = 255 + private var defaultBracketMarginWidth: Int = 160 + private var defaultBracketMarginHeight: Int = 160 + private var colorHold: Int = Color.YELLOW + private var colorCapturing: Int = Color.GREEN + private var colorBracketAlign: Int = Color.BLACK + private var colorBracketCloser: Int = Color.RED + private var colorBracketHold: Int = Color.YELLOW + private var colorBracketCapturing: Int = Color.GREEN private var zoomType: ZoomType = ZoomType.Generic - private var preventScreenshots : Boolean = true - private val cardRatio : Float = 0.65f + private var preventScreenshots: Boolean = true + private val cardRatio: Float = 0.65f + private var language: String = "en" - fun setTimeInMsPerDigit(value: Int) : DocumentCameraOptionsBuilder { + fun setTimeInMsPerDigit(value: Int): DocumentCameraOptionsBuilder { timeInMsPerDigit = value return this } - fun setDigitsToShow(value: Int) : DocumentCameraOptionsBuilder { + fun setLanguage(value: String): DocumentCameraOptionsBuilder { + language = value + return this + } + + fun setDigitsToShow(value: Int): DocumentCameraOptionsBuilder { digitsToShow = value return this } - fun setAllowBox(value: Boolean) : DocumentCameraOptionsBuilder { + fun setAllowBox(value: Boolean): DocumentCameraOptionsBuilder { allowBox = value return this } - fun setAutoCapture(value: Boolean) : DocumentCameraOptionsBuilder { + fun setAutoCapture(value: Boolean): DocumentCameraOptionsBuilder { autoCapture = value return this } - fun setBracketLengthInHorizontal(value: Int) : DocumentCameraOptionsBuilder { + fun setBracketLengthInHorizontal(value: Int): DocumentCameraOptionsBuilder { bracketLengthInHorizontal = value return this } - fun setBracketLengthInVertical(value: Int) : DocumentCameraOptionsBuilder { + fun setBracketLengthInVertical(value: Int): DocumentCameraOptionsBuilder { bracketLengthInVertical = value return this } - fun setDefaultBracketMarginWidth(value: Int) : DocumentCameraOptionsBuilder { + fun setDefaultBracketMarginWidth(value: Int): DocumentCameraOptionsBuilder { defaultBracketMarginWidth = value return this } - fun setDefaultBracketMarginHeight(value: Int) : DocumentCameraOptionsBuilder { + fun setDefaultBracketMarginHeight(value: Int): DocumentCameraOptionsBuilder { defaultBracketMarginHeight = value return this } - fun setColorHold(value: Int) : DocumentCameraOptionsBuilder { + fun setColorHold(value: Int): DocumentCameraOptionsBuilder { colorHold = value return this } - fun setColorCapturing(value: Int) : DocumentCameraOptionsBuilder { + fun setColorCapturing(value: Int): DocumentCameraOptionsBuilder { colorCapturing = value return this } - fun setColorBracketAlign(value: Int) : DocumentCameraOptionsBuilder { + fun setColorBracketAlign(value: Int): DocumentCameraOptionsBuilder { colorBracketAlign = value return this } - fun setColorBracketHold(value: Int) : DocumentCameraOptionsBuilder { + fun setColorBracketHold(value: Int): DocumentCameraOptionsBuilder { colorBracketHold = value return this } - fun setColorBracketCloser(value: Int) : DocumentCameraOptionsBuilder { + fun setColorBracketCloser(value: Int): DocumentCameraOptionsBuilder { colorBracketCloser = value return this } - fun setColorBracketCapturing(value: Int) : DocumentCameraOptionsBuilder { + fun setColorBracketCapturing(value: Int): DocumentCameraOptionsBuilder { colorBracketCapturing = value return this } - fun setPreventScreenshots(value: Boolean) : DocumentCameraOptionsBuilder { + fun setPreventScreenshots(value: Boolean): DocumentCameraOptionsBuilder { preventScreenshots = value return this } @Deprecated("No longer reliant on GMS, option is ignored", ReplaceWith("")) - fun setUseGms(value: Boolean) : DocumentCameraOptionsBuilder { + fun setUseGms(value: Boolean): DocumentCameraOptionsBuilder { return this } @@ -156,34 +163,36 @@ internal constructor( * documents (ID3) usually results in a lower resolution capture that can cause * classification/authentication errors. */ - fun setZoomType(value: ZoomType) : DocumentCameraOptionsBuilder { + fun setZoomType(value: ZoomType): DocumentCameraOptionsBuilder { zoomType = value return this } - fun build() : AcuantCameraOptions { + fun build(): AcuantCameraOptions { @Suppress("DEPRECATION") - return AcuantCameraOptions(timeInMsPerDigit, digitsToShow, allowBox, autoCapture, + return AcuantCameraOptions( + timeInMsPerDigit, digitsToShow, allowBox, autoCapture, bracketLengthInHorizontal, bracketLengthInVertical, defaultBracketMarginWidth, defaultBracketMarginHeight, colorHold, colorCapturing, colorBracketAlign, colorBracketCloser, colorBracketHold, colorBracketCapturing, cardRatio, preventScreenshots = preventScreenshots, zoomType = zoomType, - cameraMode = CameraMode.Document) + cameraMode = CameraMode.Document, language = language + ) } } @Suppress("unused") class BarcodeCameraOptionsBuilder { - private var timeInMsPerDigit : Int = DEFAULT_DELAY_BARCODE - private var digitsToShow : Int = DEFAULT_TIMEOUT_BARCODE - private var colorCapturing : Int = Color.GREEN - private var colorHold : Int = Color.WHITE - private var preventScreenshots : Boolean = true + private var timeInMsPerDigit: Int = DEFAULT_DELAY_BARCODE + private var digitsToShow: Int = DEFAULT_TIMEOUT_BARCODE + private var colorCapturing: Int = Color.GREEN + private var colorHold: Int = Color.WHITE + private var preventScreenshots: Boolean = true /** * Only an aesthetic difference to prevent jarring transition from the camera (default: [DEFAULT_DELAY_BARCODE]). */ - fun setTimeToWaitAfterDetection(value: Int) : BarcodeCameraOptionsBuilder { + fun setTimeToWaitAfterDetection(value: Int): BarcodeCameraOptionsBuilder { timeInMsPerDigit = value return this } @@ -194,31 +203,33 @@ internal constructor( * This can help account for if an id is miss-identified as having a barcode or the barcode * is damaged/unreadable. */ - fun setTimeToWaitUntilTimeout(value: Int) : BarcodeCameraOptionsBuilder { + fun setTimeToWaitUntilTimeout(value: Int): BarcodeCameraOptionsBuilder { digitsToShow = value return this } - fun setColorCapturing(value: Int) : BarcodeCameraOptionsBuilder { + fun setColorCapturing(value: Int): BarcodeCameraOptionsBuilder { colorCapturing = value return this } - fun setColorAlign(value: Int) : BarcodeCameraOptionsBuilder { + fun setColorAlign(value: Int): BarcodeCameraOptionsBuilder { colorHold = value return this } - fun setPreventScreenshots(value: Boolean) : BarcodeCameraOptionsBuilder { + fun setPreventScreenshots(value: Boolean): BarcodeCameraOptionsBuilder { preventScreenshots = value return this } - fun build() : AcuantCameraOptions { + fun build(): AcuantCameraOptions { @Suppress("DEPRECATION") - return AcuantCameraOptions(timeInMsPerDigit = timeInMsPerDigit, + return AcuantCameraOptions( + timeInMsPerDigit = timeInMsPerDigit, digitsToShow = digitsToShow, colorCapturing = colorCapturing, colorHold = colorHold, - preventScreenshots = preventScreenshots, cameraMode = CameraMode.BarcodeOnly) + preventScreenshots = preventScreenshots, cameraMode = CameraMode.BarcodeOnly + ) } } @@ -227,69 +238,71 @@ internal constructor( class MrzCameraOptionsBuilder { private var timeInMsPerDigit: Int = 900 private var digitsToShow: Int = 2 - private var allowBox : Boolean = true - private var autoCapture : Boolean = true - private var bracketLengthInHorizontal : Int = 55 - private var bracketLengthInVertical : Int = 155 - private var defaultBracketMarginWidth : Int = 100 - private var defaultBracketMarginHeight : Int = 100 - private var colorHold : Int = Color.YELLOW - private var colorCapturing : Int = Color.GREEN - private var colorBracketAlign : Int = Color.BLACK - private var colorBracketCloser : Int = Color.RED - private var colorBracketHold : Int = Color.YELLOW - private var colorBracketCapturing : Int = Color.GREEN + private var allowBox: Boolean = true + private var autoCapture: Boolean = true + private var bracketLengthInHorizontal: Int = 55 + private var bracketLengthInVertical: Int = 155 + private var defaultBracketMarginWidth: Int = 100 + private var defaultBracketMarginHeight: Int = 100 + private var colorHold: Int = Color.YELLOW + private var colorCapturing: Int = Color.GREEN + private var colorBracketAlign: Int = Color.BLACK + private var colorBracketCloser: Int = Color.RED + private var colorBracketHold: Int = Color.YELLOW + private var colorBracketCapturing: Int = Color.GREEN private var isMrzMode: Boolean = true - private var preventScreenshots : Boolean = true - private val cardRatio : Float = 0.65f + private var preventScreenshots: Boolean = true + private val cardRatio: Float = 0.65f - fun setAllowBox(value: Boolean) : MrzCameraOptionsBuilder { + fun setAllowBox(value: Boolean): MrzCameraOptionsBuilder { allowBox = value return this } - fun setBracketLengthInHorizontal(value: Int) : MrzCameraOptionsBuilder { + fun setBracketLengthInHorizontal(value: Int): MrzCameraOptionsBuilder { bracketLengthInHorizontal = value return this } - fun setBracketLengthInVertical(value: Int) : MrzCameraOptionsBuilder { + fun setBracketLengthInVertical(value: Int): MrzCameraOptionsBuilder { bracketLengthInVertical = value return this } - fun setDefaultBracketMarginWidth(value: Int) : MrzCameraOptionsBuilder { + fun setDefaultBracketMarginWidth(value: Int): MrzCameraOptionsBuilder { defaultBracketMarginWidth = value return this } - fun setDefaultBracketMarginHeight(value: Int) : MrzCameraOptionsBuilder { + fun setDefaultBracketMarginHeight(value: Int): MrzCameraOptionsBuilder { defaultBracketMarginHeight = value return this } - fun setColorCapturing(value: Int) : MrzCameraOptionsBuilder { + fun setColorCapturing(value: Int): MrzCameraOptionsBuilder { colorCapturing = value return this } - fun setColorBracketCapturing(value: Int) : MrzCameraOptionsBuilder { + fun setColorBracketCapturing(value: Int): MrzCameraOptionsBuilder { colorBracketCapturing = value return this } - fun setPreventScreenshots(value: Boolean) : MrzCameraOptionsBuilder { + fun setPreventScreenshots(value: Boolean): MrzCameraOptionsBuilder { preventScreenshots = value return this } - fun build() : AcuantCameraOptions { + fun build(): AcuantCameraOptions { @Suppress("DEPRECATION") - return AcuantCameraOptions(timeInMsPerDigit, digitsToShow, allowBox, autoCapture, + return AcuantCameraOptions( + timeInMsPerDigit, digitsToShow, allowBox, autoCapture, bracketLengthInHorizontal, bracketLengthInVertical, defaultBracketMarginWidth, defaultBracketMarginHeight, colorHold, colorCapturing, colorBracketAlign, colorBracketCloser, colorBracketHold, colorBracketCapturing, cardRatio, - preventScreenshots = preventScreenshots, cameraMode = CameraMode.Mrz) + preventScreenshots = preventScreenshots, cameraMode = CameraMode.Mrz + ) } } } \ No newline at end of file diff --git a/acuantcamera/src/main/java/com/acuant/acuantcamera/language/LocaleManager.java b/acuantcamera/src/main/java/com/acuant/acuantcamera/language/LocaleManager.java new file mode 100644 index 0000000..8b2974a --- /dev/null +++ b/acuantcamera/src/main/java/com/acuant/acuantcamera/language/LocaleManager.java @@ -0,0 +1,28 @@ +package com.acuant.acuantcamera.language; + +import android.content.Context; +import android.content.res.Configuration; +import android.content.res.Resources; +import android.os.Build; +import java.util.Locale; + +public class LocaleManager { + + public static Context updateResources(Context context, final Locale locale) { + final Resources res = context.getResources(); + final Configuration config = new Configuration(res.getConfiguration()); + Locale.setDefault(locale); + if (Build.VERSION.SDK_INT >= 17) { + + config.setLocale(locale); + context = context.createConfigurationContext(config); + // I need to set this so that recall setText(R.string.xxxx) works + res.updateConfiguration(config, res.getDisplayMetrics()); + } else { + config.locale = locale; + res.updateConfiguration(config, res.getDisplayMetrics()); + } + return context; + } + +} diff --git a/acuantfacecapture/build.gradle b/acuantfacecapture/build.gradle index 10969e1..4598aab 100644 --- a/acuantfacecapture/build.gradle +++ b/acuantfacecapture/build.gradle @@ -26,6 +26,17 @@ android { buildFeatures { viewBinding true } + + +// publishing { +// publications { +// mavenJava(MavenPublication) { +// groupId = 'com.github.hrayr09amiraghyan' +// artifactId = 'acuantfacecapture' +// version = '11.5.7' +// } +// } +// } } dependencies { // Kotlin lang diff --git a/acuantfacecapture/src/main/java/com/acuant/acuantfacecapture/camera/AcuantFaceCameraActivity.kt b/acuantfacecapture/src/main/java/com/acuant/acuantfacecapture/camera/AcuantFaceCameraActivity.kt index 89798ba..e72cc85 100644 --- a/acuantfacecapture/src/main/java/com/acuant/acuantfacecapture/camera/AcuantFaceCameraActivity.kt +++ b/acuantfacecapture/src/main/java/com/acuant/acuantfacecapture/camera/AcuantFaceCameraActivity.kt @@ -16,8 +16,10 @@ import com.acuant.acuantfacecapture.constant.Constants.ACUANT_EXTRA_FACE_IMAGE_U import com.acuant.acuantfacecapture.constant.Constants.RESULT_ERROR import com.acuant.acuantfacecapture.databinding.ActivityFaceCameraBinding import com.acuant.acuantfacecapture.interfaces.IFaceCameraActivityFinish +import com.acuant.acuantfacecapture.language.LocaleManager import com.acuant.acuantfacecapture.model.CameraMode import com.acuant.acuantfacecapture.model.FaceCaptureOptions +import java.util.* class AcuantFaceCameraActivity: AppCompatActivity(), IFaceCameraActivityFinish { @@ -25,10 +27,6 @@ class AcuantFaceCameraActivity: AppCompatActivity(), IFaceCameraActivityFinish { //Camera Launch override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - binding = ActivityFaceCameraBinding.inflate(layoutInflater) - setContentView(binding.root) - hideTopMenu() val unserializedOptions = intent.getSerializableExtra(ACUANT_EXTRA_FACE_CAPTURE_OPTIONS) @@ -38,6 +36,16 @@ class AcuantFaceCameraActivity: AppCompatActivity(), IFaceCameraActivityFinish { unserializedOptions as FaceCaptureOptions } + LocaleManager.updateResources(this, Locale(options.language)) + + + super.onCreate(savedInstanceState) + binding = ActivityFaceCameraBinding.inflate(layoutInflater) + setContentView(binding.root) + hideTopMenu() + + + //start the camera if this is the first time the activity is created (camera already exists otherwise) if (savedInstanceState == null) { val cameraFragment: AcuantBaseFaceCameraFragment = when (options.cameraMode) { diff --git a/acuantfacecapture/src/main/java/com/acuant/acuantfacecapture/language/LocaleManager.java b/acuantfacecapture/src/main/java/com/acuant/acuantfacecapture/language/LocaleManager.java new file mode 100644 index 0000000..f97c2f8 --- /dev/null +++ b/acuantfacecapture/src/main/java/com/acuant/acuantfacecapture/language/LocaleManager.java @@ -0,0 +1,31 @@ +package com.acuant.acuantfacecapture.language; + + +import android.content.Context; +import android.content.res.Configuration; +import android.content.res.Resources; +import android.os.Build; + +import java.util.Locale; + +public class LocaleManager { + + public static Context updateResources(Context context, final Locale locale) { + final Resources res = context.getResources(); + final Configuration config = new Configuration(res.getConfiguration()); + Locale.setDefault(locale); + if (Build.VERSION.SDK_INT >= 17) { + + config.setLocale(locale); + context = context.createConfigurationContext(config); + // I need to set this so that recall setText(R.string.xxxx) works + res.updateConfiguration(config, res.getDisplayMetrics()); + } else { + config.locale = locale; + res.updateConfiguration(config, res.getDisplayMetrics()); + } + return context; + } + +} + diff --git a/acuantfacecapture/src/main/java/com/acuant/acuantfacecapture/model/FaceCaptureOptions.kt b/acuantfacecapture/src/main/java/com/acuant/acuantfacecapture/model/FaceCaptureOptions.kt index 4512add..899f6cc 100644 --- a/acuantfacecapture/src/main/java/com/acuant/acuantfacecapture/model/FaceCaptureOptions.kt +++ b/acuantfacecapture/src/main/java/com/acuant/acuantfacecapture/model/FaceCaptureOptions.kt @@ -8,13 +8,15 @@ enum class CameraMode { FaceCapture, HgLiveness } /** * Serializable options object that can be passed in to change the face capture ui. */ -class FaceCaptureOptions @JvmOverloads constructor(val totalCaptureTime : Int = 2, - val colorGood : Int = Color.GREEN, - val colorDefault : Int = Color.BLACK, - val colorError : Int = Color.RED, - val colorTextGood : Int = Color.GREEN, - val colorTextDefault : Int = Color.WHITE, - val colorTextError : Int = Color.RED, - val showOval : Boolean = false, - val cameraMode: CameraMode = CameraMode.FaceCapture -) : Serializable \ No newline at end of file +class FaceCaptureOptions @JvmOverloads constructor( + var language: String = "en", + val totalCaptureTime: Int = 2, + val colorGood: Int = Color.GREEN, + val colorDefault: Int = Color.BLACK, + val colorError: Int = Color.RED, + val colorTextGood: Int = Color.GREEN, + val colorTextDefault: Int = Color.WHITE, + val colorTextError: Int = Color.RED, + val showOval: Boolean = false, + val cameraMode: CameraMode = CameraMode.FaceCapture +) : Serializable diff --git a/build.gradle b/build.gradle index f2c15cf..42ba55d 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,5 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. +apply plugin:'maven-publish' buildscript { ext.kotlin_version = '1.6.10' @@ -45,11 +46,32 @@ allprojects { } project.ext.set("versionCode", 11500) - project.ext.set("versionName", '11.5.0') - version = '11.5.0' - group = 'com.acuant' // Maven Group ID for the artifact + project.ext.set("versionName", '11.5.7') + version = '11.5.7' + group = 'com.github.hrayr09amiraghyan' // Maven Group ID for the artifact } +subprojects{ + publishing { + publications { + mavenJava(MavenPublication) { + groupId = 'com.github.hrayr09amiraghyan' + artifactId = 'acuantcamera' + version = '1.5.7' + } + } + + publications { + mavenJava(MavenPublication) { + groupId = 'com.github.hrayr09amiraghyan' + artifactId = 'acuantfacecapture' + version = '1.5.7' + } + } + } +} + + task clean(type: Delete) { delete rootProject.buildDir }