Skip to content

Commit

Permalink
chore: working refactor on both platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
farfromrefug committed Nov 3, 2023
1 parent 2583d2f commit 93be18a
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ yarn-error.log*
.yarn
tmp/
typings/
opencv/android/*
!opencv/android/README.md


# Visual Studio Code
Expand Down
4 changes: 2 additions & 2 deletions App_Resources/Android/app.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ android.applicationVariants.all { variant ->
dependencies {
def computeKotlinVersion = { -> project.hasProperty("kotlinVersion") ? kotlinVersion : "${ns_default_kotlin_version}" }
def kotlinVersion = computeKotlinVersion()
def androidxVersion = project.hasProperty("androidxVersion") ? project.androidxVersion : "1.2.0"
implementation "androidx.core:core-ktx:$androidxVersion"
// def androidxVersion = project.hasProperty("androidxVersion") ? project.androidxVersion : "1.2.0"
// implementation "androidx.core:core-ktx:$androidxVersion"
implementation 'androidx.core:core-splashscreen:1.0.1'
constraints {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion") {
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"nativescript-bitmap-factory": "^1.8.1",
"nativescript-iqkeyboardmanager": "1.5.1",
"nested-property": "^4.0.0",
"plugin-nativeprocessor": "file:plugin-nativeprocessor",
"plugin-nativeprocessor": "portal:plugin-nativeprocessor",
"svelte-native": "1.0.9",
"topojson-simplify": "3.0.3",
"util": "0.12.5"
Expand Down Expand Up @@ -135,9 +135,9 @@
"resolutions": {
"@akylas/nativescript": "portal:../NativeScript/dist/packages/core",
"@nativescript-community/https": "portal:../https/packages/https",
"@nativescript-community/ui-image": "portal:/Volumes/dev/nativescript/ui-image/packages/image",
"@nativescript-community/ui-image-colorfilter": "portal:/Volumes/dev/nativescript/ui-image/packages/image-colorfilter",
"@nativescript-community/ui-canvas": "portal:/Volumes/dev/nativescript/ui-canvas/packages/ui-canvas",
"@nativescript-community/ui-collectionview": "portal:/Volumes/dev/nativescript/ui-collectionview/packages/collectionview"
"@nativescript-community/ui-image": "portal:../ui-image/packages/image",
"@nativescript-community/ui-image-colorfilter": "portal:../ui-image/packages/image-colorfilter",
"@nativescript-community/ui-canvas": "portal:../ui-canvas/packages/ui-canvas",
"@nativescript-community/ui-collectionview": "portal:../ui-collectionview/packages/collectionview"
}
}
3 changes: 3 additions & 0 deletions plugin-nativeprocessor/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"name": "plugin-nativeprocessor",
"dependencies": {
"@nativescript-community/ui-cameraview": "*"
},
"nativescript": {
"platforms": {
"ios": "6.2.1",
Expand Down
7 changes: 6 additions & 1 deletion plugin-nativeprocessor/platforms/android/include.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ android {
}
}
if (project.hasProperty("tempBuild")) {
ndkVersion "25.2.9519653"
externalNativeBuild {
cmake {
path "src/main/cpp/CMakeLists.txt"
Expand All @@ -22,10 +23,14 @@ android {
}

kotlin {
jvmToolchain(17)
jvmToolchain(17)
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}
dependencies {
// def androidxVersion = project.hasProperty("coreKtxVersion") ? project.coreKtxVersion : "1.12.0"
// implementation "androidx.core:core-ktx:$coreKtxVersion"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.akylas.documentscanner

import android.graphics.Point
import android.graphics.PointF

fun PointF.toPoint(): Point {
return Point(x.toInt(), y.toInt())
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package com.akylas.documentscanner.models
import android.graphics.Point
import android.graphics.PointF
import android.graphics.RectF
import androidx.core.graphics.toPoint
// import androidx.core.graphics.toPoint
import com.akylas.documentscanner.distance
import com.akylas.documentscanner.move
import com.akylas.documentscanner.multiply
import com.akylas.documentscanner.toPointF
import com.akylas.documentscanner.toPoint
import java.util.Arrays

/**
Expand Down

0 comments on commit 93be18a

Please sign in to comment.