Skip to content

Commit 818500e

Browse files
authored
Merge pull request #48 from johnchrisdc/16kb
Support 16 KB page sizes
2 parents ba32045 + 19b29a3 commit 818500e

28 files changed

Lines changed: 512 additions & 102 deletions

File tree

.idea/gradle.xml

Lines changed: 2 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

Lines changed: 36 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,66 @@
1-
/*
2-
* *
3-
* * Created by Ali YÜCE on 3/2/20 11:18 PM
4-
* * https://github.com/mayuce/
5-
* * Copyright (c) 2020 . All rights reserved.
6-
* * Last modified 3/2/20 11:17 PM
7-
*
8-
*/
9-
10-
apply plugin: 'com.android.application'
11-
apply plugin: 'kotlin-android'
12-
apply plugin: 'kotlin-kapt'
13-
apply plugin: 'kotlin-android-extensions'
1+
plugins {
2+
id 'com.android.application'
3+
id 'org.jetbrains.kotlin.android'
4+
id 'org.jetbrains.kotlin.kapt'
5+
}
146

157
android {
16-
compileSdkVersion 31
8+
namespace "com.labters.documentscannerandroid"
9+
compileSdk = 34
10+
1711
defaultConfig {
1812
applicationId "com.labters.documentscannerandroid"
19-
minSdkVersion 21
20-
targetSdkVersion 31
21-
versionCode 1
22-
versionName "1.0"
13+
minSdk = 21
14+
targetSdk = 34
15+
versionCode = 1
16+
versionName = "1.0"
17+
2318
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
24-
multiDexEnabled true
19+
multiDexEnabled = true
2520
}
21+
2622
buildTypes {
2723
debug {
2824
minifyEnabled false
29-
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
25+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
3026
}
3127
release {
3228
minifyEnabled true
33-
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
29+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
3430
}
3531
}
3632

37-
dexOptions {
38-
jumboMode = true
39-
javaMaxHeapSize "12g"
33+
buildFeatures {
34+
dataBinding = true
35+
viewBinding = true
4036
}
4137

42-
buildTypes {
43-
release {
44-
minifyEnabled false
45-
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
46-
}
47-
}
48-
dataBinding {
49-
enabled true
50-
}
5138
compileOptions {
52-
sourceCompatibility JavaVersion.VERSION_1_8
53-
targetCompatibility JavaVersion.VERSION_1_8
39+
sourceCompatibility JavaVersion.VERSION_21
40+
targetCompatibility JavaVersion.VERSION_21
5441
}
42+
43+
kotlinOptions {
44+
jvmTarget = JavaVersion.VERSION_21.toString()
45+
}
46+
5547
splits {
5648
abi {
57-
enable true
49+
enable = true
5850
reset()
59-
include 'x86', 'x86_64', 'armeabi', 'armeabi-v7a', 'mips', 'mips64', 'arm64-v8a'
60-
universalApk false
51+
include 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
52+
universalApk = false
6153
}
6254
}
6355
}
6456

6557
dependencies {
6658
implementation fileTree(include: ['*.jar'], dir: 'libs')
67-
implementation 'androidx.appcompat:appcompat:1.4.0'
68-
implementation "androidx.core:core-ktx:1.7.0"
69-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
70-
implementation 'ru.superjob:kotlin-permissions:1.0.3'
59+
60+
implementation 'androidx.appcompat:appcompat:1.6.1'
61+
implementation "androidx.core:core-ktx:1.12.0"
62+
implementation "org.jetbrains.kotlin:kotlin-stdlib"
63+
// implementation 'ru.superjob:kotlin-permissions:1.0.3'
7164
implementation project(':documentscanner')
65+
implementation project(':kotlin-permissions')
7266
}

app/src/main/java/com/labters/documentscannerandroid/MainActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class MainActivity : AppCompatActivity() {
8888
"You have to grant the permissions! Grant them from app settings please.",
8989
Toast.LENGTH_LONG
9090
).show()
91-
finish()
91+
// finish()
9292
}
9393
.ask()
9494
} else {

build.gradle

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,8 @@
1-
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2-
3-
buildscript {
4-
ext.kotlin_version = '1.6.10'
5-
ext.kotlin_version = '1.5.30'
6-
repositories {
7-
google()
8-
jcenter()
9-
10-
}
11-
dependencies {
12-
classpath 'com.android.tools.build:gradle:7.0.4'
13-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
14-
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
15-
16-
// NOTE: Do not place your application dependencies here; they belong
17-
// in the individual module build.gradle files
18-
}
19-
}
20-
21-
allprojects {
22-
repositories {
23-
google()
24-
jcenter()
25-
maven { url "https://jitpack.io" }
26-
}
1+
plugins {
2+
id "com.android.application" version "8.3.2" apply false
3+
id "com.android.library" version "8.3.2" apply false
4+
id "org.jetbrains.kotlin.android" version "1.9.25" apply false
5+
id "org.jetbrains.kotlin.kapt" version "1.9.25" apply false
276
}
287

298
task clean(type: Delete) {

documentscanner/build.gradle

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,19 @@
1-
/*
2-
* *
3-
* * Created by Ali YÜCE on 3/2/20 11:18 PM
4-
* * https://github.com/mayuce/
5-
* * Copyright (c) 2020 . All rights reserved.
6-
* * Last modified 3/2/20 11:11 PM
7-
*
8-
*/
9-
10-
apply plugin: 'com.android.library'
11-
apply plugin: 'kotlin-android'
1+
plugins {
2+
id 'com.android.library'
3+
id 'org.jetbrains.kotlin.android'
4+
}
5+
126
group = 'com.github.mayuce'
13-
android {
14-
compileSdkVersion 31
157

8+
android {
9+
namespace "com.github.mayuce"
10+
compileSdk = 34
1611

1712
defaultConfig {
18-
minSdkVersion 21
19-
targetSdkVersion 31
13+
minSdk = 21
14+
targetSdk = 34
2015

2116
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
22-
2317
}
2418

2519
buildTypes {
@@ -28,19 +22,24 @@ android {
2822
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
2923
}
3024
}
25+
3126
compileOptions {
32-
sourceCompatibility = '1.8'
33-
targetCompatibility = '1.8'
27+
sourceCompatibility JavaVersion.VERSION_21
28+
targetCompatibility JavaVersion.VERSION_21
29+
}
30+
31+
kotlinOptions {
32+
jvmTarget = JavaVersion.VERSION_21.toString()
3433
}
3534
}
3635

3736
dependencies {
3837
implementation fileTree(dir: 'libs', include: ['*.jar'])
3938

40-
implementation 'androidx.appcompat:appcompat:1.4.0'
41-
implementation 'com.quickbirdstudios:opencv:4.5.2'
42-
implementation "androidx.core:core-ktx:1.7.0"
43-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
44-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2'
45-
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.4.0"
39+
implementation 'androidx.appcompat:appcompat:1.6.1'
40+
implementation 'org.opencv:opencv:4.12.0'
41+
implementation "androidx.core:core-ktx:1.12.0"
42+
implementation "org.jetbrains.kotlin:kotlin-stdlib"
43+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.9.0'
44+
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.6.2"
4645
}

documentscanner/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
~ */
88
-->
99

10-
<manifest package="com.labters.documentscanner" />
10+
<manifest />

documentscanner/src/main/java/com/labters/documentscanner/DocumentScannerView.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import androidx.lifecycle.LifecycleCoroutineScope
1717
import androidx.lifecycle.LifecycleOwner
1818
import androidx.lifecycle.findViewTreeLifecycleOwner
1919
import androidx.lifecycle.lifecycleScope
20+
import com.github.mayuce.R
2021
import com.labters.documentscanner.libraries.NativeClass
2122
import com.labters.documentscanner.libraries.PolygonView
2223
import kotlinx.coroutines.delay

documentscanner/src/main/java/com/labters/documentscanner/libraries/PolygonView.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
import android.widget.ImageView;
2323
import android.widget.Magnifier;
2424

25-
import com.labters.documentscanner.R;
25+
26+
import com.github.mayuce.R;
2627

2728
import java.util.ArrayList;
2829
import java.util.HashMap;
-17.1 MB
Binary file not shown.

0 commit comments

Comments
 (0)