Skip to content

Commit

Permalink
Merge pull request #1624 from agrosner/develop
Browse files Browse the repository at this point in the history
5.0.0-alpha1
  • Loading branch information
agrosner authored Oct 21, 2018
2 parents 0e06ea8 + cee64f0 commit 7176c0d
Show file tree
Hide file tree
Showing 710 changed files with 23,051 additions and 28,659 deletions.
4 changes: 4 additions & 0 deletions .github/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# .github



25 changes: 10 additions & 15 deletions .github/CONTRIBUTING.md → .github/contributing.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,25 @@
Contributing Guidelines
--------------------------------------------------
# CONTRIBUTING

## 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.
* Use [github issues](https://github.com/agrosner/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.
* Make sure you are using the [latest release](https://github.com/agrosner/DBFlow/releases).
* Check if the issue was [already reported or fixed](https://github.com/agrosner/DBFlow/issues?utf8=&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.

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

Expand All @@ -39,12 +34,12 @@ I welcome and encourage all pull requests. It usually will take me within 24-48
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).
* We use `type: feature request` label to mark all [feature request issues](https://github.com/agrosner/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.
* Be as specific as possible providing a precise explanation of the feature so anyone can understand the problem and the benefits of solving it.

105 changes: 55 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,93 +1,98 @@
# README

![Image](https://github.com/agrosner/DBFlow/blob/develop/dbflow_banner.png?raw=true)

[![JitPack.io](https://img.shields.io/badge/JitPack.io-4.2.3-red.svg?style=flat)](https://jitpack.io/#Raizlabs/DBFlow) [![Android Weekly](http://img.shields.io/badge/Android%20Weekly-%23129-2CB3E5.svg?style=flat)](http://androidweekly.net/issues/issue-129) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-DBFlow-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1134)
[![JitPack.io](https://img.shields.io/badge/JitPack.io-5.0.0alpha1-red.svg?style=flat)](https://jitpack.io/#Raizlabs/DBFlow) [![Android Weekly](http://img.shields.io/badge/Android%20Weekly-%23129-2CB3E5.svg?style=flat)](http://androidweekly.net/issues/issue-129) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-DBFlow-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1134)

DBFlow is fast, efficient, and feature-rich Kotlin database library built on SQLite for Android. DBFlow utilizes annotation processing to generate SQLite boilerplate for you and provides a powerful SQLite query language that makes using SQLite a joy.

DBFlow is built from a collection of some of the best features of many database libraries. Don't let an ORM or library get in your way, let the code you write in your applications be the best as possible.

Supports:

**Kotlin:** Built using the language, the library is super-concise, null-safe and efficient.

**Coroutines:** Adds coroutine support for queries.

A robust, powerful, and very simple ORM android database library with **annotation processing**.
**RX Java:** Enable applications to be reactive by listening to DB changes and ensuring your subscribers are up-to-date.

The library is built on speed, performance, and approachability. It not only eliminates most boiler-plate code for dealing with databases, but also provides a powerful and simple API to manage interactions.
**Paging:** Android architecture component paging library support for queries via `QueryDataSource`.

Let DBFlow make SQL code _flow_ like a _steady_ stream so you can focus on writing amazing apps.
**SQLCipher:** Easy database encryption support in this library.

# Why Use DBFlow
DBFlow is built from a collection of the best features of many database libraries in the most efficient way possible. Also, it is built to not only make it _significantly_ easier to deal with databases on Android, but also to provide extensibility. Don't let an ORM or library get in your way, let the code you write in your applications be the best as possible.
- **Extensibility**: No restrictions on inheritance of your table classes. They can be plain POJOs, no subclass required, but as a convenience we recommend using `BaseModel`. You can extend non-`Model` classes in different packages and use them as your DB tables. Also you can subclass other tables to join the `@Column` together, and again they can be in different packages.
- **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. 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.
**SQLite Query Language:** Enabling autocompletion on sqlite queries combined with Kotlin language features means SQLite-like syntax.

# Changelog
## Changelog

Changes exist in the [releases tab](https://github.com/Raizlabs/DBFlow/releases).

# Usage Docs
## Usage Docs

For more detailed usage, check out it out [here](https://agrosner.gitbooks.io/dbflow/content/)

# Including in your project
## Including in your project

```groovy
Add jitpack.io to your project's repositories:

```groovy
allProjects {
repositories {
google()
// required to find the project's artifacts
// place last
maven { url "https://www.jitpack.io" }
}
}
```

Add the library to the project-level build.gradle, using the apt plugin to enable Annotation Processing:
Add artifacts to your project:

```groovy
apply plugin: 'kotlin-kapt' // only required for kotlin consumers.
apply plugin: 'kotlin-kapt' // required for kotlin.
def dbflow_version = "4.2.4"
// or dbflow_version = "develop-SNAPSHOT" for grabbing latest dependency in your project on the develop branch
def dbflow_version = "5.0.0-alpha1"
// or 10-digit short-hash of a specific commit. (Useful for bugs fixed in develop, but not in a release yet)
dependencies {
// if Java use this. If using Kotlin do NOT use this.
annotationProcessor "com.github.Raizlabs.DBFlow:dbflow-processor:${dbflow_version}"
// Use if Kotlin user.
kapt "com.github.Raizlabs.DBFlow:dbflow-processor:${dbflow_version}"
kapt "com.github.agrosner.dbflow:processor:${dbflow_version}"
compile "com.github.Raizlabs.DBFlow:dbflow-core:${dbflow_version}"
compile "com.github.Raizlabs.DBFlow:dbflow:${dbflow_version}"
// Annotation Processor
// if only using Java, use this. If using Kotlin do NOT use this.
annotationProcessor "com.github.agrosner.dbflow:processor:${dbflow_version}"
// core set of libraries
compile "com.github.agrosner.dbflow:core:${dbflow_version}"
compile "com.github.agrosner.dbflow:lib:${dbflow_version}"
// sql-cipher database encryption (optional)
compile "com.github.Raizlabs.DBFlow:dbflow-sqlcipher:${dbflow_version}"
compile "com.github.agrosner.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 2 support
compile "com.github.agrosner.dbflow:reactive-streams:${dbflow_version}"
// RXJava 1 Kotlin Extensions Support
compile "com.github.Raizlabs.DBFlow:dbflow-rx-kotlinextensions:${dbflow_version}"
// Kotlin Coroutines
compile "com.github.agrosner.dbflow:coroutines:${dbflow_version}"
// RXJava 2 support
compile "com.github.Raizlabs.DBFlow:dbflow-rx2:${dbflow_version}"
// Android Architecture Components Paging Library Support
compile "com.github.agrosner.dbflow:paging:${dbflow_version}"
// RXJava 2 Kotlin Extensions Support
compile "com.github.Raizlabs.DBFlow:dbflow-rx2-kotlinextensions:${dbflow_version}"
// adds generated content provider annotations + support.
compile "com.github.agrosner.dbflow:contentprovider:${dbflow_version}"
}
```

# Pull Requests
I welcome and encourage all pull requests. Please read over these guidelines to ensure smooth PR attention:
1. Match coding style (braces, spacing, etc.) This is best achieved using **Reformat Code** shortcut, <kbd>command</kbd>+<kbd>option</kbd>+<kbd>L</kbd> on Mac and <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>L</kbd> on 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.
5. Have fun!
## Pull Requests

I welcome and encourage all pull requests. 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 **Reformat Code** shortcut, command+option+L on Mac and Ctrl+Alt+L on 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**. 5. Have fun!

## Maintainer

Originally created by [Raizlabs](https://www.raizlabs.com), a [Rightpoint](https://www.rightpoint.com) company

Maintained by [agrosner](https://github.com/agrosner) \([@agrosner](https://www.twitter.com/agrosner)\)

# Maintained By
[agrosner](https://github.com/agrosner) ([@agrosner](https://www.twitter.com/agrosner))
32 changes: 32 additions & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Table of contents

* [README](README.md)
* [GettingStarted](gettingstarted.md)
* [Usage Docs](usage2/README.md)
* [Including In Project](usage2/including-in-project.md)
* [Proguard](usage2/proguard.md)
* [Main Usage](usage2/usage/README.md)
* [Databases](usage2/usage/databases.md)
* [Models](usage2/usage/models.md)
* [Migrations](usage2/usage/migrations.md)
* [Views](usage2/usage/modelviews.md)
* [Relationships](usage2/usage/relationships.md)
* [Storing Data](usage2/usage/storingdata.md)
* [Retrieval](usage2/usage/retrieval.md)
* [SQLite Query Language](usage2/usage/sqlitewrapperlanguage.md)
* [TypeConverters](usage2/usage/typeconverters.md)
* [Observability](usage2/usage/observability.md)
* [RXJavaSupport](usage2/rxjavasupport.md)
* [Advanced Usage](usage2/advanced-usage/README.md)
* [Caching](usage2/advanced-usage/caching.md)
* [ListBasedQueries](usage2/advanced-usage/listbasedqueries.md)
* [MultipleModules](usage2/advanced-usage/multiplemodules.md)
* [QueryModels](usage2/advanced-usage/querymodels.md)
* [Indexing](usage2/advanced-usage/indexing.md)
* [SQLCipher](usage2/advanced-usage/sqlciphersupport.md)
* [ContentProviderGeneration](usage2/contentprovidergeneration.md)
* [Migration4Guide](usage2/migration4guide.md)
* [ISSUE\_TEMPLATE](issue_template.md)
* [.github](.github/README.md)
* [CONTRIBUTING](.github/contributing.md)

43 changes: 0 additions & 43 deletions android-artifacts.gradle

This file was deleted.

30 changes: 0 additions & 30 deletions bintray_upload.gradle

This file was deleted.

28 changes: 24 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,33 @@
buildscript {
ext.kotlin_version = '1.1.51'
ext {
kotlin_version = '1.2.71'
target_sdk = 28
min_sdk = 7
min_sdk_rx = 15
sql_cipher_min = 7
arch_min = 14

deps = [
kotlin : "org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}",
sql_cipher : "net.zetetic:android-database-sqlcipher:3.5.9@aar",
rx2 : 'io.reactivex.rxjava2:rxjava:2.2.2',
coroutines : "org.jetbrains.kotlinx:kotlinx-coroutines-core:0.26.1",
javapoet : 'com.squareup:javapoet:1.11.1',
kpoet : 'com.github.agrosner:KPoet:1.0.0',
javax_annotation : 'org.glassfish:javax.annotation:10.0-b28',
junit : 'junit:junit:4.12',
paging : "android.arch.paging:runtime:1.0.0",
support_annotations: "androidx.annotation:annotation:1.0.0",
]
}
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.7.3'
classpath 'com.android.tools.build:gradle:3.3.0-beta01'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.8.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand Down
File renamed without changes.
19 changes: 19 additions & 0 deletions contentprovider-annotations/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apply plugin: 'kotlin'

project.ext.artifactId = bt_name

targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_1_8

dependencies {
compile deps.kotlin
compile project(':core')
}

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

compileKotlin {
kotlinOptions {
apiVersion = "1.2"
}
}
3 changes: 3 additions & 0 deletions contentprovider-annotations/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bt_name=contentprovider-annotations
bt_packaging=jar
bt_artifact_id=contentprovider-annotations
Loading

0 comments on commit 7176c0d

Please sign in to comment.