Skip to content

Commit

Permalink
Init commit framework
Browse files Browse the repository at this point in the history
  • Loading branch information
ninjachen committed Aug 17, 2017
1 parent 64142b2 commit ed801dc
Show file tree
Hide file tree
Showing 299 changed files with 25,417 additions and 3,699 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,6 @@ gen-external-apklibs

# Fabric
fabric.properties

# Playground
playground
14 changes: 13 additions & 1 deletion README.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# Ninja

Pick the android-bootstrap as framework, it's powerful, stable and enough.

# Rename package name

1. Remove build dir, to speed up the refactor process.
2. Rename the packageName in AndroidManifest.xml
3. Rename the dir(package name) use IDE
4. (Optional) Rename the applicationId in build.gradle

[Refer in stackoverflow](https://stackoverflow.com/questions/16804093/android-studio-rename-package)
# Release Notes

### 2015-10-15
Expand Down Expand Up @@ -170,4 +182,4 @@ Any contributions, large or small, major features, bug fixes, additional
language translations, unit/integration tests are welcomed and appreciated
but will be thoroughly reviewed and discussed.

I hope this helps you in building your next android app.
I hope this helps you in building your next android app.
132 changes: 84 additions & 48 deletions app/build.gradle
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,33 @@ buildscript {
mavenLocal()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0-alpha3'
classpath 'io.fabric.tools:gradle:1.19.2'
classpath 'com.android.tools.build:gradle:2.3.2'
classpath 'io.fabric.tools:gradle:1.20.1'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
}
}

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.neenbedankt.android-apt'
apply plugin: 'org.greenrobot.greendao'

repositories {
maven { url 'https://github.com/donnfelker/mvn-repo/raw/master/' }
mavenLocal()
jcenter()
maven { url 'https://maven.fabric.io/public' }
flatDir {
dirs 'libs'
}
}

def computeVersionCode() {

if (System.env.BUILD_NUMBER) { // Check if there is a system build number.
return "$System.env.BUILD_NUMBER".toInteger()
} else if (System.env.CIRCLE_BUILD_NUM) { // Check to see if this is built on Circle CI
} else if (System.env.CIRCLE_BUILD_NUM) { // Check to see if this is built on circle CI
return "$System.env.CIRCLE_BUILD_NUM".toInteger()
} else if (System.env.TRAVIS_BUILD_NUMBER) { // Check to see if this is built on Travis CI
return "$System.env.TRAVIS_BUILD_NUMBER".toInteger()
} else {
return 1 // if none is found, default to 1.
}
Expand All @@ -46,11 +48,11 @@ def gitSha = 'git rev-parse --short HEAD'.execute([], project.rootDir).text.trim

android {
compileSdkVersion 23
buildToolsVersion '22.0.1'
buildToolsVersion '25.0.0'

defaultConfig {
minSdkVersion 18
targetSdkVersion 23
targetSdkVersion 19

versionCode computeVersionCode()
versionName computeVersionName()
Expand All @@ -60,7 +62,7 @@ android {
// buildConfigField "String", "GIT_SHA", "\"${gitSha}\""

manifestPlaceholders = [
fabricCrashlyticsApiKey: "7ba1725538a4afd002fb073a58cca7c3ba71dc84" //System.env.CRASHLYTICS_API_KEY // Set this in your ~/.gradle/gradle.properties as: crashlyticsApiKey or use "$System.env.CRASHLYTICS_API_KEY" to use a env variable (and then set that value, of course)
fabricCrashlyticsApiKey: crashlyticsApiKey // Set this in your ~/.gradle/gradle.properties as: crashlyticsApiKey or use "$System.env.CRASHLYTICS_API_KEY" to use a env variable (and then set that value, of course)
]

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand All @@ -76,12 +78,18 @@ android {

signingConfigs {
// Uncomment and set values and then this will work
// release {
// storeFile file(System.getenv('ANDROID_KEYSTORE_PATH'))
// storePassword System.getenv('ANDROID_STORE_PASS')
// keyAlias System.getenv('ANDROID_KEY_ALIAS')
// keyPassword System.getenv('ANDROID_KEY_PASS')
// }
debug {
storeFile file(ANDROID_KEYSTORE_PATH)
storePassword ANDROID_STORE_PASS
keyAlias ANDROID_KEY_ALIAS
keyPassword ANDROID_KEY_PASS
}
release {
storeFile file(ANDROID_KEYSTORE_PATH)
storePassword ANDROID_STORE_PASS
keyAlias ANDROID_KEY_ALIAS
keyPassword ANDROID_KEY_PASS
}
}

lintOptions {
Expand All @@ -92,82 +100,110 @@ android {
debug {
applicationIdSuffix '.debug'
minifyEnabled false
signingConfig signingConfigs.debug
// zipAlign false // this is default for debug
}
release {
// minifyEnabled true
// proguardFile '..\proguard.cfg'
// signingConfig signingConfigs.release
minifyEnabled true
proguardFile '../proguard.cfg'
signingConfig signingConfigs.release
// zipAlign true // this is default for release
// testPackageName 'com.donnfelker.android.bootstrap.tests'
// testPackageName 'com.zeonic.ykt.tests'
// testInstrumentationRunner 'android.test.InstrumentationTestRunner' // this is the default
}
}

// for baidu so
sourceSets {
main {
// main.java.srcDirs += 'build/generated/source/greendao'
jniLibs.srcDirs = ['libs']
}
}
}

dependencies {

// Android Support Libs
compile 'com.android.support:support-v4:23.0.1'
compile 'com.android.support:appcompat-v7:23.0.1'

compile 'com.android.support:percent:23.0.1'
compile 'com.google.code.gson:gson:2.3'

// Dependency Injection
compile 'com.google.dagger:dagger:2.0'


// View Injection
compile 'com.jakewharton:butterknife:7.0.1'

// Logging
compile 'com.jakewharton.timber:timber:3.0.2'

compile 'com.actionbarsherlock:viewpagerindicator:2.4.1'
compile 'com.nineoldandroids:library:2.4.0'

// Event Bus
compile 'com.squareup:otto:1.3.5'

compile 'org.greenrobot:eventbus:3.0.0'
// Image Loading
compile 'com.squareup.picasso:picasso:1.1.1'

//ZXing QRCode lib
compile 'com.google.zxing:core:3.3.0'
// HTTP
compile 'com.squareup.retrofit:retrofit:1.5.1'


compile 'com.squareup.retrofit:retrofit:1.9.0'
// compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.okhttp:okhttp:2.5.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.5.0'
// Retrofit XML converter (Simple)
compile('com.squareup.retrofit:converter-simplexml:1.9.0') {
exclude group: 'xpp3', module: 'xpp3'
exclude group: 'stax', module: 'stax-api'
exclude group: 'stax', module: 'stax'
}
// assert dao
compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:+'
// orm
compile 'org.greenrobot:greendao:3.2.2'
// Fabric/Crashlytics
compile('com.crashlytics.sdk.android:crashlytics:2.2.3@aar') {
transitive = true
}

testCompile 'junit:junit:4.12'
testCompile "org.robolectric:robolectric:3.0"
testCompile "org.mockito:mockito-core:1.10.19"
testCompile 'org.robolectric:shadows-support-v4:3.0'
testCompile 'com.android.support.test:runner:0.4.1'


androidTestCompile 'com.android.support.test:runner:0.4.1'
compile 'de.hdodenhof:circleimageview:2.1.0'
// baidu map
// compile files('libs/BaiduLBS_Android.jar')
compile fileTree(include: '*.jar', dir: 'libs')
compile name: 'SMSSDK-2.1.3', ext: 'aar'
compile name: 'SMSSDKGUI-2.1.3', ext: 'aar'
// didi common _v1.1.0_02_15
compile name: 'didi_sdk_common', ext: 'aar'
// RX android
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
// Because RxAndroid releases are few and far between, it is recommended you also
// explicitly depend on RxJava's latest version for bug fixes and new features.
compile 'io.reactivex.rxjava2:rxjava:2.1.0'

androidTestCompile 'junit:junit:4.12'
androidTestCompile 'com.android.support.test:runner:0.4'
// Set this dependency to use JUnit 4 rules
androidTestCompile 'com.android.support.test:rules:0.4.1'
androidTestCompile 'com.android.support.test:rules:0.4'
// Set this dependency to build and run Espresso tests
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.1'

// Contrib
androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.2.1') {
// http://stackoverflow.com/a/30931887/5210
exclude group: 'com.android.support', module: 'appcompat'
exclude group: 'com.android.support', module: 'support-v4'
exclude module: 'recyclerview-v7'
}

// Set this dependency to build and run UI Automator tests
androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2'

androidTestCompile 'org.mockito:mockito-core:1.9.5'

apt 'com.google.dagger:dagger-compiler:2.0'
provided 'javax.annotation:jsr250-api:1.0'
}
greendao {
/**
* 1, create FavouritePositionPOIDao
* 2, create EventLaunchDao
* 3, create CampaignEventReadableEntity, eventId-isRead relation
* 4, create TransportationCard
* 4.1 FavouritePositionPOI use temp field
* 5, add cityId column to TransportationCard
* 6, create ZeonicCity
* 7, create EventBellDao
*/
schemaVersion 1
// targetGenDir 'src/main/java/'
}
}
Empty file modified app/default.properties
100644 → 100755
Empty file.
Binary file added app/libs/BaiduLBS_Android.jar
Binary file not shown.
Binary file added app/libs/MobCommons-2016.1201.1839.jar
Binary file not shown.
Binary file added app/libs/MobTools-2016.1201.1839.jar
Binary file not shown.
Binary file added app/libs/SMSSDK-2.1.3.aar
Binary file not shown.
Binary file added app/libs/SMSSDKGUI-2.1.3.aar
Binary file not shown.
Binary file added app/libs/arm64-v8a/libBaiduMapSDK_base_v4_1_0.so
Binary file not shown.
Binary file added app/libs/arm64-v8a/libBaiduMapSDK_cloud_v4_1_0.so
Binary file not shown.
Binary file not shown.
Binary file added app/libs/arm64-v8a/libBaiduMapSDK_radar_v4_1_0.so
Binary file not shown.
Binary file not shown.
Binary file added app/libs/arm64-v8a/libBaiduMapSDK_util_v4_1_0.so
Binary file not shown.
Binary file added app/libs/arm64-v8a/libdidi_secure.so
Binary file not shown.
Binary file added app/libs/arm64-v8a/liblocSDK7.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added app/libs/armeabi-v7a/libBaiduMapSDK_map_v4_1_0.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added app/libs/armeabi-v7a/libdidi_secure.so
Binary file not shown.
Binary file added app/libs/armeabi-v7a/liblocSDK7.so
Binary file not shown.
Binary file added app/libs/armeabi/libBaiduMapSDK_base_v4_1_0.so
Binary file not shown.
Binary file added app/libs/armeabi/libBaiduMapSDK_cloud_v4_1_0.so
Binary file not shown.
Binary file added app/libs/armeabi/libBaiduMapSDK_map_v4_1_0.so
Binary file not shown.
Binary file added app/libs/armeabi/libBaiduMapSDK_radar_v4_1_0.so
Binary file not shown.
Binary file added app/libs/armeabi/libBaiduMapSDK_search_v4_1_0.so
Binary file not shown.
Binary file added app/libs/armeabi/libBaiduMapSDK_util_v4_1_0.so
Binary file not shown.
Binary file added app/libs/armeabi/liblocSDK7.so
Binary file not shown.
Binary file added app/libs/didi_sdk_common.aar
Binary file not shown.
Binary file added app/libs/mips/libdidi_secure.so
Binary file not shown.
Loading

0 comments on commit ed801dc

Please sign in to comment.