-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
48 changed files
with
671 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,47 @@ | ||
apply plugin: 'com.android.application' | ||
apply plugin: 'com.chenenyu.router' | ||
|
||
android { | ||
compileSdkVersion 25 | ||
buildToolsVersion "25.0.2" | ||
compileSdkVersion rootProject.ext.compileSdkVersion | ||
buildToolsVersion rootProject.ext.buildToolsVersion | ||
defaultConfig { | ||
applicationId "com.chenenyu.router.demo" | ||
minSdkVersion 14 | ||
targetSdkVersion 25 | ||
minSdkVersion rootProject.ext.minSdkVersion | ||
targetSdkVersion rootProject.ext.targetSdkVersion | ||
versionCode 1 | ||
versionName "1.0" | ||
multiDexEnabled true | ||
|
||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
|
||
lintOptions { | ||
checkReleaseBuilds false | ||
// Or, if you prefer, you can continue to check for errors in release builds, | ||
// but continue the build even when errors are found: | ||
abortOnError false | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility rootProject.ext.sourceCompatibility | ||
targetCompatibility rootProject.ext.targetCompatibility | ||
} | ||
} | ||
|
||
dependencies { | ||
compile fileTree(include: ['*.jar'], dir: 'libs') | ||
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { | ||
exclude group: 'com.android.support', module: 'support-annotations' | ||
}) | ||
annotationProcessor project(':compiler') | ||
compile project(':router') | ||
compile 'com.android.support:appcompat-v7:25.1.0' | ||
compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4' | ||
testCompile 'junit:junit:4.12' | ||
compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4' | ||
compile "com.android.support:appcompat-v7:${rootProject.ext.supportVersion}" | ||
compile 'com.android.support:multidex:1.0.1' | ||
compile project(':module1') | ||
compile project(':module2') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.chenenyu.router.demo; | ||
|
||
import android.support.multidex.MultiDexApplication; | ||
|
||
import com.chenenyu.router.Router; | ||
|
||
/** | ||
* <p> | ||
* Created by Cheney on 2017/1/12. | ||
*/ | ||
public class App extends MultiDexApplication { | ||
@Override | ||
public void onCreate() { | ||
super.onCreate(); | ||
Router.initialize(this, true); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,32 @@ | ||
// 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.3.0-beta1' | ||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' | ||
classpath 'com.android.tools.build:gradle:2.3.0-beta2' | ||
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3' | ||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' | ||
} | ||
} | ||
|
||
allprojects { | ||
repositories { | ||
jcenter() | ||
maven { | ||
url "https://dl.bintray.com/chenenyu/maven" | ||
} | ||
} | ||
} | ||
|
||
task clean(type: Delete) { | ||
delete rootProject.buildDir | ||
} | ||
|
||
ext { | ||
compileSdkVersion = 25 | ||
buildToolsVersion = "25.0.2" | ||
minSdkVersion = 14 | ||
targetSdkVersion = 25 | ||
|
||
sourceCompatibility = JavaVersion.VERSION_1_7 | ||
targetCompatibility = JavaVersion.VERSION_1_7 | ||
|
||
supportVersion = "25.1.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
apply plugin: 'groovy' | ||
|
||
buildscript { | ||
repositories { | ||
jcenter() | ||
} | ||
dependencies { | ||
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3' | ||
} | ||
} | ||
|
||
repositories { | ||
jcenter() | ||
} | ||
|
||
sourceCompatibility = "1.7" | ||
targetCompatibility = "1.7" | ||
|
||
dependencies { | ||
compile gradleApi() | ||
compile localGroovy() | ||
compile 'com.android.tools.build:gradle:2.3.0-beta2' | ||
} | ||
|
||
apply from: 'publish.gradle' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'com.jfrog.bintray' | ||
|
||
Properties config = new Properties() | ||
config.load(project.file('../publish_version.properties').newDataInputStream()) | ||
def VERSION = config.getProperty("GRADLE_PLUGIN_VERSION") | ||
def GROUP = 'com.chenenyu.router' | ||
def ARTIFACT_ID = 'gradle-plugin' | ||
|
||
group = GROUP | ||
version = VERSION | ||
|
||
task sourcesJar(type: Jar, dependsOn: classes) { | ||
from sourceSets.main.allSource | ||
classifier = 'sources' | ||
} | ||
|
||
artifacts { | ||
archives sourcesJar | ||
} | ||
|
||
publishing { | ||
publications { | ||
bintray(MavenPublication) { | ||
from components.java | ||
groupId GROUP | ||
artifactId ARTIFACT_ID | ||
version VERSION | ||
|
||
artifact sourcesJar | ||
} | ||
} | ||
} | ||
|
||
bintray { | ||
Properties properties = new Properties() | ||
boolean hasLocalFile = false | ||
if (project.rootProject.file('local.properties').exists()) { | ||
hasLocalFile = true | ||
properties.load(project.rootProject.file('local.properties').newDataInputStream()) | ||
} | ||
user = hasLocalFile ? properties.getProperty("bintray.user") : "" | ||
key = hasLocalFile ? properties.getProperty("bintray.apikey") : "" | ||
|
||
publications = ['bintray'] | ||
pkg { | ||
repo = "maven" | ||
name = "router-gradle-plugin" | ||
websiteUrl = 'https://github.com/chenenyu/Router' | ||
issueTrackerUrl = 'https://github.com/chenenyu/Router/issues' | ||
vcsUrl = 'https://github.com/chenenyu/Router.git' | ||
desc = "Router gradle plugin." | ||
labels = ["Android", "Router", "gradle", "gradle plugin"] | ||
licenses = ["Apache-2.0"] | ||
publicDownloadNumbers = true | ||
publish = true | ||
} | ||
} |
Oops, something went wrong.