Skip to content

Instantly share code, notes, and snippets.

@Piasy
Created March 10, 2016 15:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Piasy/efc83b11e82fd0e5a33a to your computer and use it in GitHub Desktop.
Save Piasy/efc83b11e82fd0e5a33a to your computer and use it in GitHub Desktop.
AndroidTDDBootStrap-Use-OkBuck
# buck & OkBuck
/buck-out/
/.buckd/
/.okbuck/
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.github.piasy.template"
android:versionCode="1"
android:versionName="1.0.0"
>
<uses-sdk
android:targetSdkVersion="23"
android:minSdkVersion="15"
/>
...
...
buildscript {
...
dependencies {
...
classpath "com.github.piasy:okbuck-gradle-plugin:0.2.6"
}
}
...
apply plugin: 'com.github.piasy.okbuck-gradle-plugin'
okbuck {
target "android-23"
overwrite true
resPackages = [
'common-android': 'com.github.piasy.common.android',
'model': 'com.github.piasy.model',
'presentation': 'com.github.piasy.template',
]
}
...
apply plugin: 'com.github.piasy.okbuck-gradle-plugin'
okbuck {
target "android-23"
overwrite true
signConfigName "develop"
resPackages = [
'common-android': 'com.github.piasy.common.android',
'model': 'com.github.piasy.model',
'presentation': 'com.github.piasy.template',
]
}
...
android {
compileSdkVersion rootProject.ext.androidCompileSdkVersion
buildToolsVersion rootProject.ext.androidBuildToolsVersion
defaultConfig {
// 删除了原来对targetSdkVersion, minSdkVersion的定义
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
buildConfigField "boolean", "REPORT_CRASH", "true"
}
...
productFlavors.whenObjectAdded { flavor ->
def flavorData = rootProject.ext[flavor.name]
// 删除了原来对applicationId, versionCode, versionName的定义
}
}
/*developCompile presentationDependencies.xLogAndroid
productCompile presentationDependencies.xLogAndroidIdle*/
compile presentationDependencies.xLogAndroid
/*developCompile presentationDependencies.leakCanary
productCompile presentationDependencies.leakCanaryIdle*/
compile presentationDependencies.leakCanary
* What went wrong:
Execution failed for task ':okbuck'.
> Can not figure out sign config, please make sure you have only
one sign config in your build.gradle, or set signConfigName in
okbuck dsl.
/Users/piasy/src/AndroidTDDBootStrap/buck-out/annotation/
common-android/__src_gen__/com/github/piasy/common/
android/utils/AndroidUtilsModule_ProvideRxErrorPro
cessorFactory.java:9: error: 找不到符号
@Generated("dagger.internal.codegen.ComponentProcessor")
^
符号: 类 Generated
/Users/piasy/src/AndroidTDDBootStrap/buck-out/annotation/
common-android/__src_gen__/com/github/piasy/common/
android/utils/AndroidUtilsModule_ProvideMiUIUtilFa
ctory.java:5: error: 程序包javax.annotation不存在
import javax.annotation.Generated;
^
/Users/piasy/src/AndroidTDDBootStrap/presentation/src/
main/java/com/github/piasy/template/features/splash/
GithubSearchFragment.java:-1: error: 不兼容的类型:
java.util.List<java.lang.Object>无法转换为
java.util.List<com.github.piasy.model.entities.GithubUser>
showSearchUserResult(Collections.emptyList());
showSearchUserResult(Collections.<GithubUser>emptyList());
This app relies on Crashlytics. Please sign up for access at https://fabric.io/sign_up,
install an Android build tool and ask a team member to invite you to this app's organization.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment