Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
ae90c0f
Decouple EventBusC2V from AndroidMvc
kejunxia Oct 20, 2015
16fac5e
Move instance of MvcGraph to controller layer
kejunxia Oct 21, 2015
fc4ee5c
EventBusV2V is injectable now
kejunxia Oct 22, 2015
dfbae49
Refactor how V2V event bus is injected and add tests for it
kejunxia Oct 21, 2015
fd58da0
Make AndroidMvc class lighter
kejunxia Oct 20, 2015
5a4d4c8
Add use method in graph to use an injectable instance easier
kejunxia Oct 22, 2015
1d0b59c
Add use method to MvcGraph and tests for it
kejunxia Oct 22, 2015
004a596
Inject nested fields in Graph.use method and corresponding tests added
kejunxia Oct 22, 2015
303311a
Bump up version to 1.4.0
kejunxia Oct 24, 2015
0363d95
Bump up Android Sdk and Support Library
kejunxia Oct 25, 2015
a977507
Set reason by fields
kejunxia Oct 29, 2015
1f9fe4c
Use FragmentPagerAdapter instead of FragmentStatePagerAdapter in test
kejunxia Oct 29, 2015
0bf6573
Uplift Android SDK for travis
kejunxia Oct 29, 2015
24fb913
Update bintray plugin to 1.4
kejunxia Oct 29, 2015
84d93f8
Hide init() away from BaseController but only in BaseControllerImpl
kejunxia Oct 29, 2015
dc3171c
Replace onAttach(Activity activity) which is deprecated in Android SD…
kejunxia Oct 29, 2015
e3da7a4
Refactor controller.init to controller.onConstruct
kejunxia Oct 29, 2015
8e86147
Remove Controller.OnInitialized since it's usage was not as document …
kejunxia Nov 1, 2015
b8ea6a2
Avoid duplicate calls to save updated note
kejunxia Nov 1, 2015
25143ed
Add new call back for controllers onRestored()
kejunxia Nov 1, 2015
47a6d22
Update ChangeLog
kejunxia Nov 1, 2015
ddb6120
Specify gradle wrapper version
kejunxia Nov 2, 2015
0725fce
Fix build
kejunxia Nov 2, 2015
33d4b88
Update gradle.properties
kejunxia Nov 2, 2015
0bc1b45
Fix compile error in samples due to library contract changes
kejunxia Nov 2, 2015
e14a47d
Fix issue weather cannot be loaded due to weather API changes
kejunxia Nov 2, 2015
091585d
Update document to include jCenter badge
kejunxia Nov 2, 2015
3f993e2
Use referenced version in readme and on website
kejunxia Nov 2, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ android:
- tools

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

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

# Additional components
- extra-google-m2repository
- extra-android-m2repository

# Specify at least one system image,
# if you need to run emulator(s) during your tests
# - sys-img-armeabi-v7a-android-22
# - sys-img-armeabi-v7a-android-23

# Emulator Management: Create, Start and Wait
#before_script:
#- echo no | android create avd --force -n test -t android-22 --abi armeabi-v7a
#- echo no | android create avd --force -n test -t android-23 --abi armeabi-v7a
#- emulator -avd test -no-skin -no-audio -no-window &
#- android-wait-for-emulator
#- adb shell input keyevent 82 &
Expand Down
9 changes: 8 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Version: 1.4.0
* Refactor of class AndroidMvc so that controllers can access the MvcGraph
* EventBusV2V is injectable same as EventBusC2V and EventBusC2C
* Add method "use" in MvcGraph to consume an injectable classes which doesn't require a class field marked by @Inject
* Remove BaseControllerImpl.onInitialized and replaced by onConstruct since onInitialized is also called when the controller is restored
* Add call back BaseControllerImpl.onRestored

Version: 1.3.0
* Refactor the MvcFragment.Reason object.
* Remove android-mvc-controller-retrofit
Expand All @@ -24,7 +31,7 @@ Once root fragment is restored, it should notify all nested fragments they are n
Fix issue that nested fragments of popping out fragment won't call onReturnFromBackground incorrectly

Version: 1.1.6
Fix issue that onViewReady is called with incorrect reason - RESTORE which should be FIRST_TIME when the fragment is a page and recreated by FragmentStatePagerAdapter
Fix issue that onViewReady is called with incorrect reason - RESTORE which should be FIRST_TIME when the fragment is a page and recreated by FragmentPagerAdapter

Version: 1.1.5
Allow remove preference key from SharedPreferenceService
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# AndroidMvc Framework
[![Build Status](https://travis-ci.org/kejunxia/AndroidMvc.svg?branch=ci-travis)](https://travis-ci.org/kejunxia/AndroidMvc)
[![Coverage Status](https://coveralls.io/repos/kejunxia/AndroidMvc/badge.svg)](https://coveralls.io/r/kejunxia/AndroidMvc)
[![Download](https://api.bintray.com/packages/kejunxia/maven/android-mvc/images/download.svg)](https://bintray.com/kejunxia/maven/android-mvc/_latestVersion)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.shipdream/android-mvc/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.shipdream/android-mvc)

# Website
Expand All @@ -26,20 +27,22 @@
See [**Source code** here](https://github.com/kejunxia/AndroidMvc/tree/master/samples/note) and download [**Sample APK** here](https://docs.google.com/uc?authuser=0&id=0BwcZml9gnwoZOHcxZFI3Z0ZGUUk&export=download)

## Download
The library is currently release to jCenter and MavenCentral
The library is currently released to both
* jCenter [![Download](https://api.bintray.com/packages/kejunxia/maven/android-mvc/images/download.svg)](https://bintray.com/kejunxia/maven/android-mvc/_latestVersion)
* Maven Central [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.shipdream/android-mvc/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.shipdream/android-mvc)

**Maven:**
```xml
<dependency>
<groupId>com.shipdream</groupId>
<artifactId>android-mvc</artifactId>
<version>1.3.0</version>
<version>[LatestVersion]</version>
</dependency>
```

**Gradle:**
```groovy
compile "com.shipdream:android-mvc:1.3.0"
compile "com.shipdream:android-mvc:[LatestVersion]"
```

## Dependency injection with reference count
Expand Down
13 changes: 6 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:1.1.+'
classpath 'com.android.tools.build:gradle:1.3.1'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0'
classpath 'com.github.dcendents:android-maven-plugin:1.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'

classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.0.1'
}
Expand Down Expand Up @@ -74,21 +73,21 @@ ext {
gitUrl = 'https://github.com/kejunxia/AndroidMvc.git' // Git repository URL
version = [
major: 1,
minor: 3,
minor: 4,
patch : 0
]
libGroup = 'com.shipdream'
libVersion = "${version.major}.${version.minor}.${version.patch}"
shouldPublish = false

androidMinSdkVersion = 14
androidCompileSdkVersion = 22
supportLibVersion = "22.2.1"
androidCompileSdkVersion = 23
supportLibVersion = "23.1.0"
androidTargetSdkVersion = androidCompileSdkVersion
lib = [
androidMinSdk: 'com.google.android:android:4.0.1.2',
androidSupportLib: "com.android.support:appcompat-v7:$supportLibVersion",
androidBuildToolVersion: "22.0.1",
androidBuildToolVersion: "23.0.1",
junit: 'junit:junit:4.12',
mokito: 'org.mockito:mockito-core:1.9.5',
slf4jApi: "org.slf4j:slf4j-api:$log4jVersion",
Expand Down
8 changes: 5 additions & 3 deletions documents/sites/Site-MarkDown.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,22 @@ First of all, let's look at some problems of the Android development below:
- Well tested by jUnit and instrument test with Espresso.

## Download
The library is currently release to jCenter and MavenCentral
The library is currently released to both
* jCenter [![Download](https://api.bintray.com/packages/kejunxia/maven/android-mvc/images/download.svg)](https://bintray.com/kejunxia/maven/android-mvc/_latestVersion)
* Maven Central [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.shipdream/android-mvc/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.shipdream/android-mvc)

**Maven:**
```xml
<dependency>
<groupId>com.shipdream</groupId>
<artifactId>android-mvc</artifactId>
<version>1.3.0</version>
<version>[LatestVersion]</version>
</dependency>
```

**Gradle:**
```groovy
compile "com.shipdream:android-mvc:1.3.0"
compile "com.shipdream:android-mvc:[LatestVersion]"
```

## Samples
Expand Down
5 changes: 4 additions & 1 deletion extension/service-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@
* limitations under the License.
*/

plugins {
id "com.jfrog.bintray" version "1.4"
}

apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'com.jfrog.bintray'

task sourceJar(type: Jar) {
from sourceSets.main.java.srcDirs
Expand Down
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-bin.zip
- add org.gradle.daemon=true
5 changes: 4 additions & 1 deletion library/android-mvc-controller/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@
* limitations under the License.
*/

plugins {
id "com.jfrog.bintray" version "1.4"
}

apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'com.jfrog.bintray'

task sourceJar(type: Jar) {
from sourceSets.main.java.srcDirs
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package com.shipdream.lib.android.mvc;

import com.shipdream.lib.poke.exception.PokeException;

public class Injector {
private static MvcGraph mvcGraph;

/**
* Config the dependencies of MvcGraph. Be careful to use this method because it will dump the
* existing graph and all injectable instances managed by it
* @param dependencies the dependencies.
*/
public static void configGraph(MvcGraph.BaseDependencies dependencies) {
try {
mvcGraph = new MvcGraph(dependencies);
} catch (PokeException e) {
throw new RuntimeException(e);
}
}

/**
* Get the graph managing injectable objects.
* @return
*/
public static MvcGraph getGraph() {
return mvcGraph;
}
}
Loading