Skip to content

Commit

Permalink
Decouple reflection api from core module creating a new module called…
Browse files Browse the repository at this point in the history
… runtime.

Upgrade several dependencies.
  • Loading branch information
Victor committed Jul 29, 2016
1 parent 1664d78 commit ccce0d0
Show file tree
Hide file tree
Showing 103 changed files with 5,394 additions and 4,974 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ allprojects {
And add next dependencies in the build.gradle of the module:
```gradle
dependencies {
compile "com.github.VictorAlbertos.RxCache:core:1.5.9"
compile "io.reactivex:rxjava:1.1.7"
compile "com.github.VictorAlbertos.RxCache:runtime:1.6.0"
compile "io.reactivex:rxjava:1.1.8"
}
```

Expand All @@ -51,13 +51,13 @@ Because RxCache uses internally [Jolyglot](https://github.com/VictorAlbertos/Jol
```gradle
dependencies {
// To use Gson
compile 'com.github.VictorAlbertos.Jolyglot:gson:0.0.2'
compile 'com.github.VictorAlbertos.Jolyglot:gson:0.0.3'
// To use Jackson
compile 'com.github.VictorAlbertos.Jolyglot:jackson:0.0.2'
compile 'com.github.VictorAlbertos.Jolyglot:jackson:0.0.3'
// To use Moshi
compile 'com.github.VictorAlbertos.Jolyglot:moshi:0.0.2'
compile 'com.github.VictorAlbertos.Jolyglot:moshi:0.0.3'
}
```

Expand Down Expand Up @@ -266,7 +266,7 @@ apply plugin: 'com.neenbedankt.android-apt'
dependencies {
// apt command comes from the android-apt plugin
apt "com.github.VictorAlbertos.RxCache:compiler:1.5.9"
apt "com.github.VictorAlbertos.RxCache:compiler:1.6.0"
}
```

Expand Down Expand Up @@ -302,7 +302,7 @@ These methods return an instance of the `Actions` class, so now you are ready to
Some actions examples:

```java
RxProvidersActionable.mocks(rxProviders)
ActionsProviders.mocks(rxProviders)
.addFirst(new Mock())
.addLast(new Mock())
//Add a new mock at 5 position
Expand Down
68 changes: 34 additions & 34 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,49 @@ apply plugin: 'com.android.application'
apply plugin: 'android-apt'

buildscript {
repositories {
mavenCentral()
jcenter()
}

dependencies {
classpath "com.neenbedankt.gradle.plugins:android-apt:1.8"
}
repositories {
mavenCentral()
jcenter()
}

dependencies {
classpath "com.neenbedankt.gradle.plugins:android-apt:1.8"
}
}

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"

defaultConfig {
applicationId "victoralbertos.io.android"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
compileSdkVersion 23
buildToolsVersion "23.0.1"

defaultConfig {
applicationId "victoralbertos.io.android"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':core')
apt project(':compiler')
compile 'com.github.VictorAlbertos.Jolyglot:gson:0.0.2'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':runtime')
apt project(':compiler')
compile 'com.github.VictorAlbertos.Jolyglot:gson:0.0.2'

testCompile 'junit:junit:4.12'
testCompile 'junit:junit:4.12'

apt "com.google.dagger:dagger-compiler:2.4"
compile "com.google.dagger:dagger:2.4"
provided "org.glassfish:javax.annotation:10.0-b28"
apt "com.google.dagger:dagger-compiler:2.4"
compile "com.google.dagger:dagger:2.4"
provided "org.glassfish:javax.annotation:10.0-b28"
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

import android.app.Activity;
import android.os.Bundle;

import io.reactivecache.ReactiveCache;
import io.victoralbertos.jolyglot.GsonSpeaker;
import java.util.ArrayList;
import java.util.List;

import io.rx_cache.internal.RxCache;
import io.victoralbertos.jolyglot.GsonSpeaker;
import rx.Observable;

/**
Expand All @@ -21,10 +19,9 @@ public class MainActivity extends Activity {
//Create integration test for max mg limit and clearing expired data


final RxProviders rxProviders = new RxCache.Builder()
.setMaxMBPersistenceCache(50)
.persistence(getApplicationContext().getFilesDir(), new GsonSpeaker())
.using(RxProviders.class);
final ReactiveCache rxProviders = new ReactiveCache.Builder()
.maxMBPersistence(50)
.using(getApplicationContext().getFilesDir(), new GsonSpeaker());

/* for (int i = 0; i < 1000; i++) {
String key = System.currentTimeMillis() + i + "";
Expand Down

This file was deleted.

This file was deleted.

26 changes: 13 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

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

task clean(type: Delete) {
delete rootProject.buildDir
delete rootProject.buildDir
}
6 changes: 4 additions & 2 deletions compiler/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ sourceCompatibility = 1.7
targetCompatibility = 1.7

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile files("${System.properties['java.home']}/../lib/tools.jar")
//compile files("${System.properties['java.home']}/../lib/tools.jar")
compile files(org.gradle.internal.jvm.Jvm.current().getToolsJar())

compile project(':core')
compile project(':runtime')

compile 'com.google.auto.service:auto-service:1.0-rc2'
compile 'com.squareup:javapoet:1.6.1'
Expand Down
6 changes: 3 additions & 3 deletions compiler/src/main/java/io/rx_cache/BrewJavaFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ private MethodSpec getActionProvider(ClassName providersClassName, Method method
String enclosingTypeListName = enclosingTypeList.toString();

ParameterizedTypeName action =
ParameterizedTypeName.get(ClassName.get(Actions.class), enclosingTypeList);
ParameterizedTypeName.get(ClassName.get(ActionsList.class), enclosingTypeList);

ParameterizedTypeName evict =
ParameterizedTypeName.get(ClassName.get(Actions.Evict.class), enclosingTypeList);
ParameterizedTypeName.get(ClassName.get(ActionsList.Evict.class), enclosingTypeList);

ParameterizedTypeName arrayList =
ParameterizedTypeName.get(ClassName.get(ArrayList.class), enclosingTypeList);
Expand Down Expand Up @@ -104,7 +104,7 @@ private MethodSpec getActionProvider(ClassName providersClassName, Method method
setCacheForEvictProvider(builder, observable, arrayList, methodName, enclosingTypeListName);
}

builder.addStatement("return Actions.with(evict, oCache)");
builder.addStatement("return ActionsList.with(evict, oCache)");

return builder.build();
}
Expand Down
Loading

0 comments on commit ccce0d0

Please sign in to comment.