配置翻墻環(huán)境
安裝Python迄损,配置其環(huán)境命令
root :
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
classpath 'com.antfortune.freeline:gradle:0.8.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
application moudle :
apply plugin: 'com.antfortune.freeline'
android{
.....
freeline {
hack true
}
}
最底層的moudle(GFrame)或者Application所在的moudle:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.antfortune.freeline:runtime:0.8.1'
}
自定義的 Application:
public class App extends Application {
@Override
public void onCreate() {
super.onCreate();
FreelineCore.init(this);
}
}
第一次:
在當(dāng)前工作目錄下 執(zhí)行:
gradle initFreeline -Pmirror
success ->
python命令 python freeline.py
第二次以后:
python命令 freeline.py
note:
不要混淆代碼
使用Freeline打包诀浪,能加快打包速度财骨,但是手動(dòng)gradle同步的時(shí)候榕茧,速度不能減少
最后說明:項(xiàng)目的名字不能帶特殊符號(hào)"-"或者"_"