Skip to content

Commit e22e933

Browse files
authored
Merge pull request #71 from mikifus/room-database-refactor
Huge refactor
2 parents 2b2444c + 3575043 commit e22e933

File tree

259 files changed

+9741
-6752
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

259 files changed

+9741
-6752
lines changed

README.md

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,33 @@
11
# Padland
22
Padland is a tool to manage, share, remember and read collaborative documents based on the Etherpad technology in Android.
33

4-
<a href="https://f-droid.org/repository/browse/?fdid=com.mikifus.padland" target="_blank">
5-
<img src="https://f-droid.org/badge/get-it-on.png" height="90"/></a>
6-
7-
<a href='https://play.google.com/store/apps/details?id=com.mikifus.padland'>
8-
<img alt='Get it on Google Play' src='https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png' height="90" /></a>
9-
10-
![Introduction screenshot 1](fastlane/metadata/android/en-US/images/phoneScreenshots/1.png)
11-
![Introduction screenshot 2](fastlane/metadata/android/en-US/images/phoneScreenshots/2.png)
12-
![Introduction screenshot 3](fastlane/metadata/android/en-US/images/phoneScreenshots/3.png)
13-
![Introduction screenshot 4](fastlane/metadata/android/en-US/images/phoneScreenshots/4.png)
14-
![Introduction screenshot 5](fastlane/metadata/android/en-US/images/phoneScreenshots/5.png)
4+
<p align="center" style="text-align:center;">
5+
<a href="https://f-droid.org/repository/browse/?fdid=com.mikifus.padland" alt='Download from F-Droid' target="_blank">
6+
<img src="https://f-droid.org/badge/get-it-on.png" height="90"/>
7+
</a>
8+
9+
<a href='https://play.google.com/store/apps/details?id=com.mikifus.padland'>
10+
<img alt='Get it on Google Play' src='https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png' height="90" />
11+
</a>
12+
</p>
13+
14+
<p align="center" style="text-align:center;">
15+
<img alt='Padland Logo' src='./metadata/en-US/images/icon.png' height="90" />
16+
</p>
17+
18+
<p align="center" style="text-align:center;">
19+
<picture>
20+
<source media="(prefers-color-scheme: light)" srcset="./metadata/en-US/images/phoneScreenshots/1.png">
21+
<source media="(prefers-color-scheme: dark)" srcset="./metadata/en-US/images/phoneScreenshots/2.png">
22+
<img alt="Screenshot 1" src="./metadata/en-US/images/phoneScreenshots/1.png" width="150">
23+
</picture>
24+
25+
<picture>
26+
<source media="(prefers-color-scheme: light)" srcset="./metadata/en-US/images/phoneScreenshots/3.png">
27+
<source media="(prefers-color-scheme: dark)" srcset="./metadata/en-US/images/phoneScreenshots/4.png">
28+
<img alt="Screenshot 2" src="./metadata/en-US/images/phoneScreenshots/3.png" width="150">
29+
</picture>
30+
</p>
1531

1632
## Translations
1733
Thanks to all the volunteers that already contributed!
@@ -30,16 +46,21 @@ To try your new server create a new pad and choose it. You can make it the defau
3046

3147
## Opening a URL
3248

33-
The user can now share an URL to the app in order to open it. Keep in mind that the host server must be previously added, otherwise the URL will be considered unsafe.
49+
The user can now share a URL to the app in order to open it. Keep in mind that the host server must be previously added, otherwise the URL will be considered unsafe.
3450

3551
## Current version
36-
2.0
52+
3.0
53+
54+
### v3.0
55+
- Migrated database to Room.
56+
- Better implementation of Material Design.
57+
- Extreme refactoring keeping the same features and adding some minor ones.
58+
- Export and import data.
3759

38-
##
3960
### v2.0
4061
- Migrated code to Kotlin.
4162
- Implemented AndroidX and Material Design.
42-
- Theme dark/light follows device
63+
- Theme dark/light follows device.
4364

4465
### v1.9
4566
- Fixed a vulnerability.

app/build.gradle

Lines changed: 68 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,38 @@
11
apply plugin: "com.android.application"
22
apply plugin: 'kotlin-android'
3+
apply plugin: 'kotlin-kapt'
4+
apply plugin: 'androidx.room'
35

46
android {
57
signingConfigs {
68
release {
79
}
810
}
9-
compileSdkVersion 33
1011
defaultConfig {
12+
compileSdk 34
1113
applicationId "com.mikifus.padland"
12-
minSdkVersion 14
13-
targetSdkVersion 33
14-
versionName '2.0'
15-
versionCode 25
14+
minSdkVersion 19
15+
targetSdkVersion 34
16+
versionName '3.0'
17+
versionCode 26
1618
multiDexEnabled true
17-
// vectorDrawables.useSupportLibrary = true
19+
vectorDrawables.useSupportLibrary = true
20+
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
21+
}
22+
23+
// used by Room, to test migrations
24+
sourceSets {
25+
getByName("androidTest").assets.srcDir("$projectDir/schemas")
1826
}
27+
1928
buildTypes {
2029
debug {
2130
pseudoLocalesEnabled true
2231
minifyEnabled false
23-
buildConfigField "Boolean", "DEBUG_MODE", "true"
2432
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
2533
}
2634
release {
2735
minifyEnabled true
28-
buildConfigField "Boolean", "DEBUG_MODE", "false"
2936
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
3037
signingConfig signingConfigs.release
3138
}
@@ -36,24 +43,53 @@ android {
3643
disable 'InvalidPackage'
3744
}
3845
namespace 'com.mikifus.padland'
39-
defaultConfig {
40-
vectorDrawables.useSupportLibrary = true
41-
}
4246
compileOptions {
4347
sourceCompatibility JavaVersion.VERSION_17
4448
targetCompatibility JavaVersion.VERSION_17
4549
}
4650
kotlinOptions {
4751
jvmTarget = '17'
4852
}
53+
testOptions {
54+
unitTests {
55+
includeAndroidResources = true
56+
}
57+
}
58+
}
59+
60+
room {
61+
schemaDirectory("$projectDir/schemas")
4962
}
5063

5164
dependencies {
52-
implementation 'androidx.core:core-ktx:1.10.1'
53-
implementation 'com.pnikosis:materialish-progress:1.7'
54-
implementation 'com.github.paolorotolo:appintro:4.1.0'
55-
implementation 'androidx.recyclerview:recyclerview:1.3.1'
56-
implementation 'com.google.android.material:material:1.9.0'
65+
implementation 'androidx.core:core-ktx:1.12.0'
66+
implementation 'com.github.paolorotolo:appintro:6.3.1'
67+
implementation 'androidx.recyclerview:recyclerview:1.3.2'
68+
implementation 'com.google.android.material:material:1.11.0'
69+
implementation 'androidx.recyclerview:recyclerview-selection:1.1.0'
70+
implementation 'com.android.support.constraint:constraint-layout:2.0.4'
71+
implementation "androidx.preference:preference-ktx:1.2.1"
72+
implementation 'com.github.martin-stone:hsv-alpha-color-picker-android:3.1.0'
73+
implementation 'com.google.code.gson:gson:2.10'
74+
implementation 'androidx.webkit:webkit:1.10.0'
75+
76+
// Room database
77+
def room_version = "2.6.1"
78+
79+
implementation("androidx.room:room-runtime:$room_version")
80+
annotationProcessor("androidx.room:room-compiler:$room_version")
81+
82+
// To use Kotlin annotation processing tool (kapt)
83+
kapt("androidx.room:room-compiler:$room_version")
84+
// To use Kotlin Symbol Processing (KSP)
85+
annotationProcessor("androidx.room:room-compiler:$room_version")
86+
87+
// // optional - Kotlin Extensions and Coroutines support for Room
88+
implementation("androidx.room:room-ktx:$room_version")
89+
90+
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0"
91+
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.7.0"
92+
5793

5894
constraints {
5995
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0") {
@@ -63,4 +99,20 @@ dependencies {
6399
because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib")
64100
}
65101
}
102+
103+
// 'androidTest' dependencies for instrumentation (tests on device).
104+
// These are for room database migration test.
105+
androidTestImplementation "androidx.test.ext:junit-ktx:1.1.5"
106+
androidTestImplementation "androidx.room:room-testing:2.6.1"
107+
androidTestImplementation "androidx.test:runner:1.5.2"
108+
109+
110+
// 'test' dependencies to run unit tests from the IDE
111+
testImplementation "androidx.test.ext:junit-ktx:1.1.5"
112+
testImplementation 'org.robolectric:robolectric:4.11.1'
113+
114+
// AndroidJUnitRunner and JUnit Rules
115+
testImplementation "androidx.test:runner:1.5.2"
116+
testImplementation "androidx.test:rules:1.5.0"
117+
66118
}

0 commit comments

Comments
 (0)