Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackoder committed Apr 20, 2016
1 parent ae888a9 commit bf01773
Show file tree
Hide file tree
Showing 65 changed files with 4,770 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .configs/custom/application.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// 自定义的application配置脚本
//
10 changes: 10 additions & 0 deletions .configs/custom/base.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// 自定义的基础配置脚本
//
ext {
downloadVerison = '2.0.0-rc5'

download = [
core : "com.nd.hy.android.component.download:download-core:${downloadVerison}",
ui : "com.nd.hy.android.component.download:download-ui:${downloadVerison}",
]
}
42 changes: 42 additions & 0 deletions .configs/custom/library.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// 自定义的library配置脚本
//
ext {
frescoVersion = "0.5.0"
parcelerVersion = '1.0.1'
blurVersion = '0.1-rc2'
webViewVersion = '0.1.0-rc1'
methodBridgeVersion = '1.0.3'

exerciseVersion = "3.5.3-rc6-sdp-04"

framePluginVersion = '1.2.0-rc17'//'1.2.0-rc16'
readerLibVersion = '1.3.0'
videoVersion = '1.2.0-rc6'

activeAndroidVersion = '3.2.2.3-rc3'

blurs = [
core : "com.nd.hy.android.blur:core:${blurVersion}",
glide : "com.nd.hy.android.blur:extra-glide:${blurVersion}",
fresco : "com.nd.hy.android.blur:extra-fresco:${blurVersion}",
]

reader = [
pdf : "com.nd.hy.android.reader:reader-pdf:${readerLibVersion}",
image: "com.nd.hy.android.reader:reader-image:${readerLibVersion}",
html5: "com.nd.hy.android.reader:reader-html5:${readerLibVersion}",
]

video = [
video : "com.nd.hy.android.video:video:${videoVersion}",
videoDoc : "com.nd.hy.android.video.doc:video-doc:${videoVersion}",
videoExercise : "com.nd.hy.android.video.exercise:video-exercise:${videoVersion}",

videoEngineVLC: "com.nd.hy.android.video.engine.vlc:video-engine-vlc:${videoVersion}",
videoEngineMP : "com.nd.hy.android.video.engine.mp:video-engine-original:${videoVersion}",
]

exercise = [
exercise : "com.nd.hy.android.exercise:module_exercise:${exerciseVersion}"
]
}
2 changes: 2 additions & 0 deletions .configs/custom/sign/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.properties
*.keystore
Empty file.
38 changes: 38 additions & 0 deletions .configs/gradle/android-artifacts.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
apply plugin: 'com.github.dcendents.android-maven'

install {
repositories.mavenInstaller {
pom {
project {
packaging POM_PACKAGING
name POM_NAME
url POM_SITE_URL
scm {
connection POM_GIT_URL
developerConnection POM_GIT_URL
url POM_SITE_URL
}
}
}
}
}

task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}

task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}

artifacts {
//archives javadocJar
archives sourcesJar
}
33 changes: 33 additions & 0 deletions .configs/gradle/android.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// !该文件是从远程拉取的模板,请勿修改
//
// update: 2016021701

android {
def conf = this.ext;
compileSdkVersion conf.androidCompileSdkVersion
buildToolsVersion conf.androidBuildToolsVersion

defaultConfig {
minSdkVersion conf.androidMinSdkVersion
targetSdkVersion conf.androidTargetSdkVersion
testInstrumentationRunner conf.testInstrumentationRunner
}

packagingOptions {
exclude 'LICENSE.txt'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/ASL2.0'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/services/javax.annotation.processing.Processor'
}

lintOptions {
abortOnError false;
disable 'InvalidPackage' //Some libraries have issues with this.
disable 'OldTargetApi'
//Lint gives this warning but SDK 20 would be Android L Beta.
disable 'IconDensities' //For testing purpose. This is safe to remove.
disable 'IconMissingDensityFolder' //For testing purpose. This is safe to remove.
}
}
15 changes: 15 additions & 0 deletions .configs/gradle/androidJarBuild.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// !该文件是从远程拉取的模板,请勿修改
//
// update: 2016021701

configurations {
jarArchives
}

android.libraryVariants.all { variant ->
def name = variant.buildType.name
def task = project.tasks.create "jar${name.capitalize()}", Jar
task.dependsOn variant.javaCompile
task.from variant.javaCompile.destinationDir
artifacts.add('jarArchives', task);
}
14 changes: 14 additions & 0 deletions .configs/gradle/application.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// !该文件是从远程拉取的模板,请勿修改
//
// update: 2016021701

apply plugin: 'com.android.application'

apply from: "${cacheConfigs}/gradle/dependencies.gradle"
apply from: "${cacheConfigs}/gradle/checkstyle.gradle"
apply from: "${cacheConfigs}/gradle/findbugs.gradle"

apply from: "${cacheConfigs}/gradle/android.gradle"
apply from: "${cacheConfigs}/custom/base.gradle"
apply from: "${cacheConfigs}/custom/application.gradle"
apply from: "${cacheConfigs}/gradle/retrolambda.gradle"
23 changes: 23 additions & 0 deletions .configs/gradle/checkstyle.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// !该文件是从远程拉取的模板,请勿修改
//
// update: 2016021701

apply plugin: 'checkstyle'

dependencies {
checkstyle('com.puppycrawl.tools:checkstyle:6.5')
}

task checkstyle(type: Checkstyle) {
def cachePath = "${cacheConfigs}/checkstyle"
def file = new File("${cachePath}/nd_checkstyle.xml")
def fileSuppressions = new File("${cachePath}/nd_checkstyle_suppressions.xml")

configFile file
configProperties.checkstyleSuppressionsPath = fileSuppressions.absolutePath
// Where is my suppressions file for checkstyle is...
source 'src'
include '**/*.java'
exclude '**/gen/**'
classpath = files()
}
87 changes: 87 additions & 0 deletions .configs/gradle/dependencies.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
// !该文件是从远程拉取的模板,请勿修改
//
// update: 2016041501

ext {
//Android
androidBuildToolsVersion = "23.0.1"
androidMinSdkVersion = getPropertyOrDefault("MIN_SDK_VERSION", 9)
androidTargetSdkVersion = getPropertyOrDefault("TARGET_SDK_VERSION", 22)
androidCompileSdkVersion = 23
testInstrumentationRunner = "android.support.test.runner.AndroidJUnitRunner"

//Libraries
androidSupportVersion = "23.1.1"
daggerVersion = '2.0'
butterKnifeVersion = '6.0.0'
rxJavaVersion = '1.0.14'
rxAndroidVersion = '1.0.1'
rxLifecycleVersion = '0.3.0'
rxBindingVersion = '0.2.0'
javaxAnnotationVersion = '10.0-b28'
superToastsVersion = "1.3.4"
retrofitVersion = "1.9.0"
okHttpVersion = "2.4.0"
jacksonVersion = "2.4.2"
nineOldAndroidVersion = "2.4.0"

//Testing
robolectricVersion = '2.4'
jUnitVersion = '4.11'
mockitoVersion = '1.9.5'
dexmakerVersion = '1.0'
espressoVersion = '2.0'
testingSupportLibVersion = '0.1'

//Hermes
hermesVersion = '2.2.3-rc3'

libs = [
supportV4 : "com.android.support:support-v4:${androidSupportVersion}",
appcompat : "com.android.support:appcompat-v7:${androidSupportVersion}",
supportDesign : "com.android.support:design:${androidSupportVersion}",
supportAnnotation : "com.android.support:support-annotations:${androidSupportVersion}",
recyclerView : "com.android.support:recyclerview-v7:${androidSupportVersion}",
cardView : "com.android.support:cardview-v7:${androidSupportVersion}",

daggerCompiler : "com.google.dagger:dagger-compiler:${daggerVersion}",
dagger : "com.google.dagger:dagger:${daggerVersion}",
butterKnife : "com.jakewharton:butterknife:${butterKnifeVersion}",
rxJava : "io.reactivex:rxjava:${rxJavaVersion}",
rxAndroid : "io.reactivex:rxandroid:${rxAndroidVersion}",
rxLifecycle : "com.trello:rxlifecycle:${rxLifecycleVersion}",
rxBinding : "com.jakewharton.rxbinding:rxbinding:${rxBindingVersion}",
rxComponent : "com.trello:rxlifecycle-components:${rxLifecycleVersion}",
javaxAnnotation : "org.glassfish:javax.annotation:${javaxAnnotationVersion}",
superToasts : "com.github.johnpersano:supertoasts:${superToastsVersion}@aar",
retrofit : "com.squareup.retrofit:retrofit:${retrofitVersion}",
retrofitWithJackson: "com.squareup.retrofit:converter-jackson:${retrofitVersion}",
jacksonDatabind : "com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}",
okHttp : "com.squareup.okhttp:okhttp:${okHttpVersion}",
timber : "com.jakewharton.timber:timber:3.0.1",
nineOldAndroid : "com.nineoldandroids:library:${nineOldAndroidVersion}",
]

test = [
junit : "junit:junit:4.12",
robolectric : "org.robolectric:robolectric:3.0",
burst : "com.squareup.burst:burst-junit4:1.1.0",
mockito : "org.mockito:mockito-core:${mockitoVersion}",
dexmaker : "com.google.dexmaker:dexmaker:${dexmakerVersion}",
dexmakerMockito : "com.google.dexmaker:dexmaker-mockito:${dexmakerVersion}",
espresso : "com.android.support.test.espresso:espresso-core:${espressoVersion}",
testingSupportLib: "com.android.support.test:testing-support-lib:${testingSupportLibVersion}",
]

hermes = [
frame : "com.nd.hy.android.hermes:hermes-frame:${hermesVersion}",
util : "com.nd.hy.android.hermes:commons-util:${hermesVersion}",
view : "com.nd.hy.android.hermes:commons-view:${hermesVersion}",
bus : "com.nd.hy.android.hermes:commons-bus:${hermesVersion}",
data : "com.nd.hy.android.hermes:commons-data:${hermesVersion}",
cache : "com.nd.hy.android.hermes:commons-cache:${hermesVersion}",
rx : "com.nd.hy.android.hermes:hermes-rx:${hermesVersion}",
compat: "com.nd.hy.android.hermes:hermes-compat:${hermesVersion}",
]

}
24 changes: 24 additions & 0 deletions .configs/gradle/deployment.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// !该文件是从远程拉取的模板,请勿修改
//
// update: 2016021701

ext {
isPushSdp = getPropertyOrDefault("PUSH_SDP", "true").toBoolean();
isSnapshot = this.version.endsWith("-SNAPSHOT");

if (!isPushSdp) {
deployHost = "http://nexus.huayu.nd"
deployReleaseUrl = "${deployHost}/nexus/content/repositories/releases"
deploySnapshotUrl = "${deployHost}/nexus/content/repositories/snapshots"
nexusUsername = System.properties['deployHyUsername']
nexusPassword = System.properties['deployHyPassword']
} else {
deployHost = "http://nexus.sdp.nd"
deployReleaseUrl = "${deployHost}/nexus/content/repositories/android"
deploySnapshotUrl = "${deployHost}/nexus/content/repositories/android_snapshot"
nexusUsername = System.properties['deploySdpUsername']
nexusPassword = System.properties['deploySdpPassword']
}

deployLocalRepo = "file:///e:/repo"
}
16 changes: 16 additions & 0 deletions .configs/gradle/dexcount.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// !该文件是从远程拉取的模板,请勿修改
//
// update: 2016021701

// A Gradle plugin to report the number of method references in your APK on every build.
// https://github.com/KeepSafe/dexcount-gradle-plugin
apply plugin: 'com.getkeepsafe.dexcount'

dexcount {
includeClasses = false
includeFieldCount = true
//includeTotalMethodCount = false
printAsTree = false
orderByMethodCount = true
verbose = false
}
30 changes: 30 additions & 0 deletions .configs/gradle/findbugs.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// !该文件是从远程拉取的模板,请勿修改
//
// update: 2016021701

apply plugin: 'findbugs'

task findbugs(type: FindBugs) {
ignoreFailures = false
effort = "max"
reportLevel = "high"
excludeFilter = new File("${cacheConfigs}/findbugs/findbugs-filter.xml")
classes = files("${project.buildDir}/intermediates/classes")

source 'src'
include '**/*.java'
exclude '**/gen/**'

reports {
xml.enabled = false
html.enabled = true
xml {
destination "${project.buildDir}/reports/findbugs/findbugs.xml"
}
html {
destination "${project.buildDir}/reports/findbugs/findbugs.html"
}
}

classpath = files()
}
Loading

0 comments on commit bf01773

Please sign in to comment.