Skip to content

Commit

Permalink
Merge pull request #146 from wallabag/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
tcitworld committed Dec 3, 2015
2 parents 0cdeb9b + c28b7e4 commit cd032f1
Show file tree
Hide file tree
Showing 73 changed files with 4,780 additions and 1,460 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ android:
- tools

# The BuildTools version used by your project
- build-tools-23.0.1
- build-tools-23.0.2

# The SDK version used to compile your project
- android-22
- android-23

# Additional components
# - extra-google-google_play_services
Expand All @@ -22,5 +22,5 @@ android:
# if you need to run emulator(s) during your tests
# - sys-img-armeabi-v7a-android-19
# - sys-img-x86-android-17

sudo: false
script: ./gradlew build check
96 changes: 0 additions & 96 deletions app/app.iml

This file was deleted.

25 changes: 13 additions & 12 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 22
buildToolsVersion '23.0.1'
compileSdkVersion 23
buildToolsVersion '23.0.2'

defaultConfig {
applicationId "fr.gaulupeau.apps.InThePoche"
minSdkVersion 8
targetSdkVersion 22
versionCode 11
versionName "1.8"
targetSdkVersion 23
versionCode 17
versionName "1.9"
}

lintOptions {
abortOnError false
}

buildTypes {
Expand All @@ -27,16 +31,13 @@ android {
}
}
}

lintOptions {
abortOnError false
}
}

dependencies {
compile 'com.android.support:appcompat-v7:22.+'
compile 'com.android.support:recyclerview-v7:22.+'
compile 'com.android.support:design:22.+'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'de.greenrobot:greendao:2.0.0'
compile 'com.facebook.stetho:stetho:1.2.0'
compile 'com.squareup.okhttp:okhttp:2.5.0'
Expand Down
33 changes: 20 additions & 13 deletions app/src-gen/fr/gaulupeau/apps/Poche/entity/Article.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ public class Article {
private String author;
private String title;
private String url;
private Boolean favorite;
private Boolean archive;
private Boolean sync;
private java.util.Date updateDate;
private Double articleProgress;

public Article() {
}
Expand All @@ -23,16 +25,18 @@ public Article(Long id) {
this.id = id;
}

public Article(Long id, Integer articleId, String content, String author, String title, String url, Boolean archive, Boolean sync, java.util.Date updateDate) {
public Article(Long id, Integer articleId, String content, String author, String title, String url, Boolean favorite, Boolean archive, Boolean sync, java.util.Date updateDate, Double articleProgress) {
this.id = id;
this.articleId = articleId;
this.content = content;
this.author = author;
this.title = title;
this.url = url;
this.favorite = favorite;
this.archive = archive;
this.sync = sync;
this.updateDate = updateDate;
this.articleProgress = articleProgress;
}

public Long getId() {
Expand Down Expand Up @@ -83,6 +87,14 @@ public void setUrl(String url) {
this.url = url;
}

public Boolean getFavorite() {
return favorite;
}

public void setFavorite(Boolean favorite) {
this.favorite = favorite;
}

public Boolean getArchive() {
return archive;
}
Expand All @@ -107,17 +119,12 @@ public void setUpdateDate(java.util.Date updateDate) {
this.updateDate = updateDate;
}

@Override
public String toString() {
return "Article{" +
"id=" + id +
", articleId=" + articleId +
", author='" + author + '\'' +
", title='" + title + '\'' +
", url='" + url + '\'' +
", archive=" + archive +
", sync=" + sync +
", updateDate=" + updateDate +
'}';
public Double getArticleProgress() {
return articleProgress;
}

public void setArticleProgress(Double articleProgress) {
this.articleProgress = articleProgress;
}

}
48 changes: 33 additions & 15 deletions app/src-gen/fr/gaulupeau/apps/Poche/entity/ArticleDao.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ public static class Properties {
public final static Property Author = new Property(3, String.class, "author", false, "author");
public final static Property Title = new Property(4, String.class, "title", false, "title");
public final static Property Url = new Property(5, String.class, "url", false, "url");
public final static Property Archive = new Property(6, Boolean.class, "archive", false, "archive");
public final static Property Sync = new Property(7, Boolean.class, "sync", false, "sync");
public final static Property UpdateDate = new Property(8, java.util.Date.class, "updateDate", false, "update_date");
public final static Property Favorite = new Property(6, Boolean.class, "favorite", false, "favorite");
public final static Property Archive = new Property(7, Boolean.class, "archive", false, "archive");
public final static Property Sync = new Property(8, Boolean.class, "sync", false, "sync");
public final static Property UpdateDate = new Property(9, java.util.Date.class, "updateDate", false, "update_date");
public final static Property ArticleProgress = new Property(10, Double.class, "articleProgress", false, "article_progress");
};


Expand All @@ -53,9 +55,11 @@ public static void createTable(SQLiteDatabase db, boolean ifNotExists) {
"\"author\" TEXT," + // 3: author
"\"title\" TEXT," + // 4: title
"\"url\" TEXT," + // 5: url
"\"archive\" INTEGER," + // 6: archive
"\"sync\" INTEGER," + // 7: sync
"\"update_date\" INTEGER);"); // 8: updateDate
"\"favorite\" INTEGER," + // 6: favorite
"\"archive\" INTEGER," + // 7: archive
"\"sync\" INTEGER," + // 8: sync
"\"update_date\" INTEGER," + // 9: updateDate
"\"article_progress\" REAL);"); // 10: articleProgress
}

/** Drops the underlying database table. */
Expand Down Expand Up @@ -99,19 +103,29 @@ protected void bindValues(SQLiteStatement stmt, Article entity) {
stmt.bindString(6, url);
}

Boolean favorite = entity.getFavorite();
if (favorite != null) {
stmt.bindLong(7, favorite ? 1L: 0L);
}

Boolean archive = entity.getArchive();
if (archive != null) {
stmt.bindLong(7, archive ? 1L: 0L);
stmt.bindLong(8, archive ? 1L: 0L);
}

Boolean sync = entity.getSync();
if (sync != null) {
stmt.bindLong(8, sync ? 1L: 0L);
stmt.bindLong(9, sync ? 1L: 0L);
}

java.util.Date updateDate = entity.getUpdateDate();
if (updateDate != null) {
stmt.bindLong(9, updateDate.getTime());
stmt.bindLong(10, updateDate.getTime());
}

Double articleProgress = entity.getArticleProgress();
if (articleProgress != null) {
stmt.bindDouble(11, articleProgress);
}
}

Expand All @@ -131,9 +145,11 @@ public Article readEntity(Cursor cursor, int offset) {
cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // author
cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // title
cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // url
cursor.isNull(offset + 6) ? null : cursor.getShort(offset + 6) != 0, // archive
cursor.isNull(offset + 7) ? null : cursor.getShort(offset + 7) != 0, // sync
cursor.isNull(offset + 8) ? null : new java.util.Date(cursor.getLong(offset + 8)) // updateDate
cursor.isNull(offset + 6) ? null : cursor.getShort(offset + 6) != 0, // favorite
cursor.isNull(offset + 7) ? null : cursor.getShort(offset + 7) != 0, // archive
cursor.isNull(offset + 8) ? null : cursor.getShort(offset + 8) != 0, // sync
cursor.isNull(offset + 9) ? null : new java.util.Date(cursor.getLong(offset + 9)), // updateDate
cursor.isNull(offset + 10) ? null : cursor.getDouble(offset + 10) // articleProgress
);
return entity;
}
Expand All @@ -147,9 +163,11 @@ public void readEntity(Cursor cursor, Article entity, int offset) {
entity.setAuthor(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
entity.setTitle(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
entity.setUrl(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
entity.setArchive(cursor.isNull(offset + 6) ? null : cursor.getShort(offset + 6) != 0);
entity.setSync(cursor.isNull(offset + 7) ? null : cursor.getShort(offset + 7) != 0);
entity.setUpdateDate(cursor.isNull(offset + 8) ? null : new java.util.Date(cursor.getLong(offset + 8)));
entity.setFavorite(cursor.isNull(offset + 6) ? null : cursor.getShort(offset + 6) != 0);
entity.setArchive(cursor.isNull(offset + 7) ? null : cursor.getShort(offset + 7) != 0);
entity.setSync(cursor.isNull(offset + 8) ? null : cursor.getShort(offset + 8) != 0);
entity.setUpdateDate(cursor.isNull(offset + 9) ? null : new java.util.Date(cursor.getLong(offset + 9)));
entity.setArticleProgress(cursor.isNull(offset + 10) ? null : cursor.getDouble(offset + 10));
}

/** @inheritdoc */
Expand Down
8 changes: 6 additions & 2 deletions app/src-gen/fr/gaulupeau/apps/Poche/entity/DaoMaster.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,25 @@
import de.greenrobot.dao.identityscope.IdentityScopeType;

import fr.gaulupeau.apps.Poche.entity.ArticleDao;
import fr.gaulupeau.apps.Poche.entity.OfflineURLDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* Master of DAO (schema version 1): knows all DAOs.
* Master of DAO (schema version 2): knows all DAOs.
*/
public class DaoMaster extends AbstractDaoMaster {
public static final int SCHEMA_VERSION = 1;
public static final int SCHEMA_VERSION = 2;

/** Creates underlying database table using DAOs. */
public static void createAllTables(SQLiteDatabase db, boolean ifNotExists) {
ArticleDao.createTable(db, ifNotExists);
OfflineURLDao.createTable(db, ifNotExists);
}

/** Drops underlying database table using DAOs. */
public static void dropAllTables(SQLiteDatabase db, boolean ifExists) {
ArticleDao.dropTable(db, ifExists);
OfflineURLDao.dropTable(db, ifExists);
}

public static abstract class OpenHelper extends SQLiteOpenHelper {
Expand Down Expand Up @@ -57,6 +60,7 @@ public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
public DaoMaster(SQLiteDatabase db) {
super(db, SCHEMA_VERSION);
registerDaoClass(ArticleDao.class);
registerDaoClass(OfflineURLDao.class);
}

public DaoSession newSession() {
Expand Down
Loading

0 comments on commit cd032f1

Please sign in to comment.