Skip to content

Commit

Permalink
Merge pull request #1234 from Raizlabs/develop
Browse files Browse the repository at this point in the history
Version 4.0.0-beta6
  • Loading branch information
agrosner authored Apr 7, 2017
2 parents 42fdeb4 + bc2afe4 commit f2d90db
Show file tree
Hide file tree
Showing 464 changed files with 10,027 additions and 11,595 deletions.
50 changes: 50 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
Contributing Guidelines
--------------------------------------------------

This document provides general guidelines about how to contribute to the project. Keep in mind these important things before you start contributing.

## Reporting issues

* Use [github issues](https://github.com/Raizlabs/DBFlow/issues) to report a bug.
* Before creating a new issue:
* Make sure you are using the [latest release](https://github.com/Raizlabs/DBFlow/releases).
* Check if the issue was [already reported or fixed](https://github.com/Raizlabs/DBFlow/issues?utf8=%E2%9C%93&q=is%3Aissue). Notice that it may not be released yet.
* If you found a match add the github "+1" reaction brief comment. This helps prioritize the issues addressing the most common and critical ones first. If possible, add additional information to help us reproduce, and find the issue. Please use your best judgement.
* Reporting issues:
* Please include the following information to help maintainers to fix the problem faster:
* Android version you are targeting.
* Full console output of stack trace or code compilation error.
* Any other additional detail you think it would be useful to understand and solve the problem.


## Pull requests

I welcome and encourage all pull requests. It usually will take me within 24-48 hours to respond to any issue or request. Here are some basic rules to follow to ensure timely addition of your request:
1. Match coding style (braces, spacing, etc.) This is best achieved using CMD+Option+L (Reformat code) on Mac (not sure for Windows) with Android Studio defaults.
2. If its a feature, bugfix, or anything please only change code to what you specify.
3. Please keep PR titles easy to read and descriptive of changes, this will make them easier to merge :)
4. Pull requests _must_ be made against `develop` branch. Any other branch (unless specified by the maintainers) will get rejected.


### Suggested git workflow to contribute

1. Fork the repository.
2. Clone your forked project into your developer machine: `git clone [email protected]:<your-github-username>/DBFlow.git`
3. Add the original project repo as upstream repository in your forked project: `git remote add upstream [email protected]:DBFlow/DBFlow.git`
4. Before starting a new feature make sure your forked develop branch is synchronized upstream master branch. Considering you do not mere your pull request into develop you can run: `git checkout master` and then `git pull upstream develop`. Optionally `git push origin develop`.
5. Create a new branch. Note that the starting point is the upstream develop branch HEAD. `git checkout -b my-feature-name`
6. Stage all your changes `git add .` and commit them `git commit -m "Your commit message"`
7. Make sure your branch is up to date with upstream develop, `git pull --rebase upstream develop`, resolve conflicts if necessary. This will move your commit to the top of git stack.
8. Squash your commits into one commit. `git rebase -i HEAD~6` considering you did 6 commits.
9. Push your branch into your forked remote repository.
10. Create a new pull request adding any useful comment.


### Feature proposal

We would love to hear your ideas and make discussions about it.

* Use github issues to make feature proposals.
* We use `type: feature request` label to mark all [feature request issues](https://github.com/Raizlabs/DBFlow/labels/type%3A%20feature%20request).
* Before submitting your proposal make sure there is no similar feature request. If you find a match, feel free to join the discussion or just or just act with a reaction if you think the feature is worth implementing.
* Be as specific as possible providing a precise explanation of the feature so anyone can understand the problem and the benefits of solving it.
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ DBFlow is built from a collection of the best features of many database librarie
- **Speed**: Built with java's annotation processing code generation, there's almost zero runtime performance hit by using this library (only reflection is creation of the main, generated database module's constructor). This library saves hours of boilerplate code and maintenance by generating the code for you. With powerful model caching (multiple primary key `Model` too), you can surpass the speed of SQLite by reusing where possible. We have support for lazy-loading relationships on-demand such as `@ForeignKey` or `@OneToMany` that make queries happen super-fast.
- **SQLite Query Flow**: The queries in this library adhere as closely as possible to SQLite native queries. `select(name, screenSize).from(Android.class).where(name.is("Nexus 5x")).and(version.is(6.0)).querySingle()`
- **Open Source**: This library is fully open source and contributions are not only welcomed, but encouraged.
- **Robust**: We support `Trigger`, `ModelView`, `Index`, `Migration`, built-in ways to manage database access, and many more features.
- **Robust**: We support `Trigger`, `ModelView`, `Index`, `Migration`, built-in ways to manage database access, and many more features. SQLCipher, RXJava, and more!
- **Multiple Databases, Multiple Modules**: we seamlessly support multiple database files, database modules using DBFlow in other dependencies, simultaneously.
- **Built On SQLite**: SQLite is the most widely used database engine in world and using it as your base, you are not tied to a limited set of platforms or libraries.

Expand All @@ -41,7 +41,7 @@ Add the library to the project-level build.gradle, using the apt plugin to enabl

```groovy
def dbflow_version = "4.0.0-beta5"
def dbflow_version = "4.0.0-beta6"
// or dbflow_version = "develop-SNAPSHOT" for grabbing latest dependency in your project on the develop branch
// or 10-digit short-hash of a specific commit. (Useful for bugs fixed in develop, but not in a release yet)
Expand All @@ -56,11 +56,23 @@ Add the library to the project-level build.gradle, using the apt plugin to enabl
// sql-cipher database encryption (optional)
compile "com.github.Raizlabs.DBFlow:dbflow-sqlcipher:${dbflow_version}"
compile "net.zetetic:android-database-sqlcipher:${sqlcipher_version}@aar"
// kotlin extensions
compile "com.github.Raizlabs.DBFlow:dbflow-kotlinextensions:${dbflow_version}"
// RXJava 1 support
compile "com.github.Raizlabs.DBFlow:dbflow-rx:${dbflow_version}"
// RXJava 1 Kotlin Extensions Support
compile "com.github.Raizlabs.DBFlow:dbflow-rx-kotlinextensions:${dbflow_version}"
// RXJava 2 support
compile "com.github.Raizlabs.DBFlow:dbflow-rx2:${dbflow_version}"
// RXJava 2 Kotlin Extensions Support
compile "com.github.Raizlabs.DBFlow:dbflow-rx2-kotlinextensions:${dbflow_version}"
}
// if you're building with Kotlin
Expand Down
5 changes: 4 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
buildscript {
ext.kotlin_version = '1.1.1'
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.android.tools.build:gradle:2.3.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.6.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
jcenter()
maven { url "https://www.jitpack.io" }
}
}

Expand Down

This file was deleted.

1 change: 1 addition & 0 deletions dbflow-jack-tests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
32 changes: 32 additions & 0 deletions dbflow-jack-tests/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"

defaultConfig {
applicationId "com.grosner.dbflow.jack.tests"
minSdkVersion 9
targetSdkVersion 25
versionCode 1
versionName "1.0"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

jackOptions {
enabled true
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
annotationProcessor project("${dbflow_project_prefix}dbflow-processor")
compile project("${dbflow_project_prefix}dbflow-core")
compile project("${dbflow_project_prefix}dbflow")
}
25 changes: 25 additions & 0 deletions dbflow-jack-tests/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/andrewgrosner/Library/Android/sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
5 changes: 5 additions & 0 deletions dbflow-jack-tests/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<manifest package="com.grosner.dbflow.jack.tests">

<application/>

</manifest>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.raizlabs.android.dbflow.test;
package com.grosner.dbflow.jack.tests;

import com.raizlabs.android.dbflow.annotation.Column;
import com.raizlabs.android.dbflow.annotation.ForeignKey;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.raizlabs.android.dbflow.test;
package com.grosner.dbflow.jack.tests;

import com.raizlabs.android.dbflow.annotation.Column;
import com.raizlabs.android.dbflow.annotation.ModelView;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.raizlabs.android.dbflow.test;
package com.grosner.dbflow.jack.tests;

import com.raizlabs.android.dbflow.annotation.Database;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package com.grosner.dbflow.jack.tests;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;

import com.raizlabs.android.dbflow.config.FlowConfig;
import com.raizlabs.android.dbflow.config.FlowManager;


public class DemoActivity extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//setContentView(R.layout.activity_demo);

FlowManager.init(new FlowConfig.Builder(getApplicationContext()).build());
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
//getMenuInflater().inflate(R.menu.menu_demo, menu);
return true;
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();

//noinspection SimplifiableIfStatement
//if (id == R.id.action_settings) {
// return true;
//}

return super.onOptionsItemSelected(item);
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.raizlabs.android.dbflow.test;
package com.grosner.dbflow.jack.tests;

import com.raizlabs.android.dbflow.annotation.Migration;
import com.raizlabs.android.dbflow.sql.SQLiteType;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.raizlabs.android.dbflow.test;
package com.grosner.dbflow.jack.tests;

import com.raizlabs.android.dbflow.annotation.Migration;
import com.raizlabs.android.dbflow.sql.migration.BaseMigration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.raizlabs.android.dbflow.test;
package com.grosner.dbflow.jack.tests;

import com.raizlabs.android.dbflow.annotation.Column;
import com.raizlabs.android.dbflow.annotation.PrimaryKey;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.raizlabs.android.dbflow.test;
package com.grosner.dbflow.jack.tests;

import com.raizlabs.android.dbflow.annotation.Database;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.raizlabs.android.dbflow.test;
package com.grosner.dbflow.jack.tests;

import com.raizlabs.android.dbflow.annotation.Column;
import com.raizlabs.android.dbflow.annotation.PrimaryKey;
Expand Down
19 changes: 3 additions & 16 deletions dbflow-kotlinextensions/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,13 @@ apply plugin: 'kotlin-android'
project.ext.artifactId = bt_name


repositories {
mavenCentral()
}

android {
compileSdkVersion 25
compileSdkVersion Integer.valueOf(dbflow_target_sdk)
buildToolsVersion dbflow_build_tools_version

defaultConfig {
minSdkVersion 7
targetSdkVersion 25
minSdkVersion dbflow_min_sdk
targetSdkVersion Integer.valueOf(dbflow_target_sdk)
}
buildTypes {
debug {
Expand All @@ -37,15 +33,6 @@ dependencies {
compile project("${dbflow_project_prefix}dbflow-core")
compile project("${dbflow_project_prefix}dbflow")
}
buildscript {
ext.kotlin_version = '1.0.5-2'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

apply from: '../kotlin-artifacts.gradle'

Expand Down
Loading

0 comments on commit f2d90db

Please sign in to comment.