Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Commit

Permalink
Add a no-op version of the library
Browse files Browse the repository at this point in the history
  • Loading branch information
MGaetan89 committed Mar 6, 2016
1 parent 0a213a6 commit 82b5930
Show file tree
Hide file tree
Showing 45 changed files with 88 additions and 5 deletions.
6 changes: 4 additions & 2 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ android {
}

dependencies {
compile project(':lib')
compile project(':kolumbus')
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'io.realm:realm-android-library:0.87.5'
compile 'io.realm:realm-annotations:0.87.5'
Expand Down
File renamed without changes.
38 changes: 38 additions & 0 deletions kolumbus-no-op/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'kotlin-android'

group = 'com.github.MGaetan89'

android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
resourcePrefix 'kolumbus_'

defaultConfig {
minSdkVersion 9
targetSdkVersion 23
versionCode 2
versionName '0.2'
}

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

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
}

dependencies {
compile 'io.realm:realm-android-library:0.87.5'
compile 'io.realm:realm-annotations:0.87.5'
compile 'org.jetbrains.kotlin:kotlin-runtime:1.0.0'

kapt 'io.realm:realm-annotations:0.87.5'
kapt 'io.realm:realm-annotations-processor:0.87.5'
}
17 changes: 17 additions & 0 deletions kolumbus-no-op/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/gaetan/Dev/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 *;
#}
2 changes: 2 additions & 0 deletions kolumbus-no-op/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="io.kolumbus"/>
14 changes: 14 additions & 0 deletions kolumbus-no-op/src/main/kotlin/io/kolumbus/Kolumbus.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package io.kolumbus

import android.content.Context
import io.realm.RealmObject

object Kolumbus {
fun explore(table: Class<out RealmObject>) = this

fun forget(table: Class<out RealmObject>) = this

fun forgetAll() = Unit

fun navigate(context: Context) = Unit
}
1 change: 1 addition & 0 deletions kolumbus/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions kolumbus/src/main/kotlin/io/kolumbus/KolumbusModule.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package io.kolumbus

import io.realm.annotations.RealmModule

@RealmModule(library = true, allClasses = true)
class KolumbusModule {
}
3 changes: 2 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
include ':app',
':lib'
':kolumbus',
':kolumbus-no-op'

0 comments on commit 82b5930

Please sign in to comment.