Fixed some build errors.

This commit is contained in:
ChronosX88 2019-03-26 21:28:27 +04:00
parent 692177b1f6
commit 8e349a6955
3 changed files with 21 additions and 15 deletions

View File

@ -35,19 +35,19 @@ android {
} }
dependencies { dependencies {
def room_version = "2.1.0-alpha04"
implementation fileTree(include: ['*.jar'], dir: 'libs') implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.1.0-alpha02' implementation 'androidx.appcompat:appcompat:1.1.0-alpha02'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3' implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'
implementation "androidx.room:room-runtime:$room_version" implementation "androidx.room:room-runtime:2.1.0-alpha04"
annotationProcessor "androidx.room:room-compiler:$room_version" annotationProcessor "androidx.room:room-compiler:2.1.0-alpha04"
implementation('net.tomp2p:tomp2p-all:5.0-Beta8') { implementation('net.tomp2p:tomp2p-all:5.0-Beta8') {
exclude group: 'org.mapdb', module: 'mapdb' exclude group: 'org.mapdb', module: 'mapdb'
} }
implementation 'org.slf4j:slf4j-log4j12:+' implementation 'org.slf4j:slf4j-log4j12:1.7.26'
implementation group: 'com.h2database', name: 'h2-mvstore', version: '1.4.197' implementation group: 'com.h2database', name: 'h2-mvstore', version: '1.4.197'
implementation 'com.google.android.material:material:1.1.0-alpha04' implementation 'com.google.android.material:material:1.1.0-alpha04'
implementation 'androidx.preference:preference:1.1.0-alpha03' implementation 'androidx.preference:preference:1.1.0-alpha03'
implementation 'com.google.code.gson:gson:2.8.5' implementation 'com.google.code.gson:gson:2.8.5'
implementation group: 'org.springframework.security', name: 'spring-security-crypto', version: '3.1.0.RELEASE' implementation group: 'org.springframework.security', name: 'spring-security-crypto', version: '3.1.0.RELEASE'
implementation 'de.hdodenhof:circleimageview:3.0.0'
} }

View File

@ -2,16 +2,22 @@
"formatVersion": 1, "formatVersion": 1,
"database": { "database": {
"version": 2, "version": 2,
"identityHash": "1fdccce4cf398929958d6bf1f0ccfea6", "identityHash": "aa6543fc56b99224739cb0b53a63d48e",
"entities": [ "entities": [
{ {
"tableName": "messages", "tableName": "messages",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `chatID` TEXT, `sender` TEXT, `date` TEXT, `text` TEXT, PRIMARY KEY(`id`))", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `type` INTEGER NOT NULL, `chatID` TEXT, `sender` TEXT, `timestamp` INTEGER NOT NULL, `text` TEXT)",
"fields": [ "fields": [
{ {
"fieldPath": "id", "fieldPath": "id",
"columnName": "id", "columnName": "id",
"affinity": "TEXT", "affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "type",
"columnName": "type",
"affinity": "INTEGER",
"notNull": true "notNull": true
}, },
{ {
@ -27,10 +33,10 @@
"notNull": false "notNull": false
}, },
{ {
"fieldPath": "date", "fieldPath": "timestamp",
"columnName": "date", "columnName": "timestamp",
"affinity": "TEXT", "affinity": "INTEGER",
"notNull": false "notNull": true
}, },
{ {
"fieldPath": "text", "fieldPath": "text",
@ -43,7 +49,7 @@
"columnNames": [ "columnNames": [
"id" "id"
], ],
"autoGenerate": false "autoGenerate": true
}, },
"indices": [], "indices": [],
"foreignKeys": [] "foreignKeys": []
@ -96,7 +102,7 @@
"views": [], "views": [],
"setupQueries": [ "setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", "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, \"1fdccce4cf398929958d6bf1f0ccfea6\")" "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, \"aa6543fc56b99224739cb0b53a63d48e\")"
] ]
} }
} }

View File

@ -7,7 +7,7 @@ import androidx.room.PrimaryKey;
@Entity(tableName = "messages") @Entity(tableName = "messages")
public class MessageEntity { public class MessageEntity {
@PrimaryKey(autoGenerate = true) String id; @PrimaryKey(autoGenerate = true) public int id;
@ColumnInfo public int type; @ColumnInfo public int type;
@ColumnInfo public String chatID; @ColumnInfo public String chatID;
@ColumnInfo public String sender; @ColumnInfo public String sender;
@ -22,7 +22,7 @@ public class MessageEntity {
this.text = text; this.text = text;
} }
public String getId() { public int getId() {
return id; return id;
} }