Skip to content

Commit

Permalink
Merge pull request #164 from SecUSo/development
Browse files Browse the repository at this point in the history
Privacy Friendly Notes 2.0
  • Loading branch information
coderPaddyS authored Sep 3, 2024
2 parents a2fbec6 + ee11413 commit 316d093
Show file tree
Hide file tree
Showing 130 changed files with 4,279 additions and 2,178 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ local.properties
.idea/modules.xml
.idea/scopes/scope_settings.xml
.idea/vcs.xml
.idea/*
*.iml

# OS-specific files
Expand Down
52 changes: 0 additions & 52 deletions .idea/assetWizardSettings.xml

This file was deleted.

27 changes: 15 additions & 12 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'androidx.room'

def pfaFile = rootProject.file('pfa.properties')

Expand All @@ -23,14 +24,8 @@ android {
minSdkVersion 21
compileSdk 34
targetSdkVersion 34
versionCode 18
versionName "1.4.5"

javaCompileOptions {
annotationProcessorOptions {
arguments += ["room.schemaLocation": "$projectDir/schemas".toString()]
}
}
versionCode 19
versionName "2.0.0"
}

applicationVariants.configureEach { variant ->
Expand Down Expand Up @@ -63,6 +58,10 @@ android {
jvmTarget = JavaVersion.VERSION_17.toString()
}

room {
schemaDirectory "$projectDir/schemas"
}

namespace 'org.secuso.privacyfriendlynotes'
}

Expand All @@ -71,12 +70,15 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'androidx.room:room-testing:2.6.0'
implementation 'androidx.preference:preference-ktx:1.2.1'
implementation 'com.google.android.material:material:1.11.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'junit:junit:4.13.2'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.10.0'
implementation 'com.getbase:floatingactionbutton:1.10.1'
implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation 'com.simplify:ink:1.0.0'
implementation 'petrov.kristiyan:colorpicker-library:1.1.10'
implementation 'io.github.eltos:simpledialogfragments:3.6.3'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation "androidx.constraintlayout:constraintlayout:2.1.4"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1'
Expand All @@ -88,15 +90,16 @@ dependencies {

androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

def room_version = "2.5.2"
androidTestImplementation('androidx.test:runner:1.5.2')
androidTestImplementation('androidx.test:core:1.5.0')

implementation "androidx.room:room-runtime:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version"
implementation "androidx.room:room-ktx:$room_version"

implementation "androidx.core:core-ktx:1.12.0"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.6.2"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
repositories {
Expand Down
116 changes: 116 additions & 0 deletions app/schemas/org.secuso.privacyfriendlynotes.room.NoteDatabase/4.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
{
"formatVersion": 1,
"database": {
"version": 4,
"identityHash": "3833bf55517c3164a564eea2186d4cb9",
"entities": [
{
"tableName": "notes",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL, `content` TEXT NOT NULL, `type` INTEGER NOT NULL, `category` INTEGER NOT NULL, `in_trash` INTEGER NOT NULL)",
"fields": [
{
"fieldPath": "_id",
"columnName": "_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "content",
"columnName": "content",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "type",
"columnName": "type",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "category",
"columnName": "category",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "in_trash",
"columnName": "in_trash",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"_id"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "categories",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL)",
"fields": [
{
"fieldPath": "_id",
"columnName": "_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"_id"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "notifications",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_noteId` INTEGER NOT NULL, `time` INTEGER NOT NULL, PRIMARY KEY(`_noteId`))",
"fields": [
{
"fieldPath": "_noteId",
"columnName": "_noteId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "time",
"columnName": "time",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"_noteId"
]
},
"indices": [],
"foreignKeys": []
}
],
"views": [],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '3833bf55517c3164a564eea2186d4cb9')"
]
}
}
134 changes: 134 additions & 0 deletions app/schemas/org.secuso.privacyfriendlynotes.room.NoteDatabase/5.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
{
"formatVersion": 1,
"database": {
"version": 5,
"identityHash": "11488d17adaf947e6a6c0deb72b97ea7",
"entities": [
{
"tableName": "notes",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL, `content` TEXT NOT NULL, `type` INTEGER NOT NULL, `category` INTEGER NOT NULL, `in_trash` INTEGER NOT NULL, `last_modified` TEXT NOT NULL, `custom_order` INTEGER NOT NULL)",
"fields": [
{
"fieldPath": "_id",
"columnName": "_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "content",
"columnName": "content",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "type",
"columnName": "type",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "category",
"columnName": "category",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "in_trash",
"columnName": "in_trash",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "last_modified",
"columnName": "last_modified",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "custom_order",
"columnName": "custom_order",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"_id"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "categories",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL, `color` TEXT)",
"fields": [
{
"fieldPath": "_id",
"columnName": "_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "color",
"columnName": "color",
"affinity": "TEXT",
"notNull": false
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"_id"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "notifications",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_noteId` INTEGER NOT NULL, `time` INTEGER NOT NULL, PRIMARY KEY(`_noteId`))",
"fields": [
{
"fieldPath": "_noteId",
"columnName": "_noteId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "time",
"columnName": "time",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"_noteId"
]
},
"indices": [],
"foreignKeys": []
}
],
"views": [],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '11488d17adaf947e6a6c0deb72b97ea7')"
]
}
}
Loading

0 comments on commit 316d093

Please sign in to comment.