check android Gradle config for release mode (#18804)

* update getCocosCommandPath function

* fix typo error in proguard-rules

* update gradle judge OperatingSystem API

* keep default ndk-build
This commit is contained in:
leda 2018-05-11 15:07:19 +08:00 committed by minggo
parent 391f30a3f3
commit f5e35cfe4f
17 changed files with 17 additions and 27 deletions

View File

@ -1,5 +1,3 @@
import org.apache.tools.ant.taskdefs.condition.Os
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
android { android {

View File

@ -1,4 +1,4 @@
import org.apache.tools.ant.taskdefs.condition.Os import org.gradle.internal.os.OperatingSystem;
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
@ -105,7 +105,7 @@ buildTypes {
} }
def getCocosCommandPath() { def getCocosCommandPath() {
if (Os.isFamily(Os.FAMILY_WINDOWS)) { if (OperatingSystem.current().isWindows()) {
return 'cocos.bat' return 'cocos.bat'
} }
else { else {

View File

@ -21,7 +21,7 @@
-dontwarn org.cocos2dx.** -dontwarn org.cocos2dx.**
-keep public class com.chukong.** { *; } -keep public class com.chukong.** { *; }
-dontwarn com.chukong.** -dontwarn com.chukong.**
-keep public com.huawei.android.** { *; } -keep public class com.huawei.android.** { *; }
-dontwarn com.huawei.android.** -dontwarn com.huawei.android.**
# Proguard Apache HTTP for release # Proguard Apache HTTP for release

View File

@ -1,4 +1,4 @@
import org.apache.tools.ant.taskdefs.condition.Os import org.gradle.internal.os.OperatingSystem;
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
@ -106,7 +106,7 @@ android {
} }
def getCocosCommandPath() { def getCocosCommandPath() {
if (Os.isFamily(Os.FAMILY_WINDOWS)) { if (OperatingSystem.current().isWindows()) {
return 'cocos.bat' return 'cocos.bat'
} }
else { else {

View File

@ -21,7 +21,7 @@
-dontwarn org.cocos2dx.** -dontwarn org.cocos2dx.**
-keep public class com.chukong.** { *; } -keep public class com.chukong.** { *; }
-dontwarn com.chukong.** -dontwarn com.chukong.**
-keep public com.huawei.android.** { *; } -keep public class com.huawei.android.** { *; }
-dontwarn com.huawei.android.** -dontwarn com.huawei.android.**
# Proguard Apache HTTP for release # Proguard Apache HTTP for release

View File

@ -1,5 +1,3 @@
import org.apache.tools.ant.taskdefs.condition.Os
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
android { android {

View File

@ -1,5 +1,3 @@
import org.apache.tools.ant.taskdefs.condition.Os
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
android { android {

View File

@ -1,5 +1,3 @@
import org.apache.tools.ant.taskdefs.condition.Os
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
android { android {

View File

@ -1,3 +1,5 @@
import org.gradle.internal.os.OperatingSystem;
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
android { android {
@ -104,7 +106,7 @@ android {
} }
def getCocosCommandPath() { def getCocosCommandPath() {
if (Os.isFamily(Os.FAMILY_WINDOWS)) { if (OperatingSystem.current().isWindows()) {
return 'cocos.bat' return 'cocos.bat'
} }
else { else {

View File

@ -21,7 +21,7 @@
-dontwarn org.cocos2dx.** -dontwarn org.cocos2dx.**
-keep public class com.chukong.** { *; } -keep public class com.chukong.** { *; }
-dontwarn com.chukong.** -dontwarn com.chukong.**
-keep public com.huawei.android.** { *; } -keep public class com.huawei.android.** { *; }
-dontwarn com.huawei.android.** -dontwarn com.huawei.android.**
# Proguard Apache HTTP for release # Proguard Apache HTTP for release

View File

@ -1,4 +1,4 @@
import org.apache.tools.ant.taskdefs.condition.Os import org.gradle.internal.os.OperatingSystem;
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
@ -106,7 +106,7 @@ android {
} }
def getCocosCommandPath() { def getCocosCommandPath() {
if (Os.isFamily(Os.FAMILY_WINDOWS)) { if (OperatingSystem.current().isWindows()) {
return 'cocos.bat' return 'cocos.bat'
} }
else { else {

View File

@ -21,7 +21,7 @@
-dontwarn org.cocos2dx.** -dontwarn org.cocos2dx.**
-keep public class com.chukong.** { *; } -keep public class com.chukong.** { *; }
-dontwarn com.chukong.** -dontwarn com.chukong.**
-keep public com.huawei.android.** { *; } -keep public class com.huawei.android.** { *; }
-dontwarn com.huawei.android.** -dontwarn com.huawei.android.**
# Proguard Apache HTTP for release # Proguard Apache HTTP for release

View File

@ -1,5 +1,3 @@
import org.apache.tools.ant.taskdefs.condition.Os
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
android { android {

View File

@ -21,7 +21,7 @@
-dontwarn org.cocos2dx.** -dontwarn org.cocos2dx.**
-keep public class com.chukong.** { *; } -keep public class com.chukong.** { *; }
-dontwarn com.chukong.** -dontwarn com.chukong.**
-keep public com.huawei.android.** { *; } -keep public class com.huawei.android.** { *; }
-dontwarn com.huawei.android.** -dontwarn com.huawei.android.**
# Proguard Apache HTTP for release # Proguard Apache HTTP for release

View File

@ -1,4 +1,4 @@
import org.apache.tools.ant.taskdefs.condition.Os import org.gradle.internal.os.OperatingSystem;
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
@ -106,7 +106,7 @@ android {
} }
def getCocosCommandPath() { def getCocosCommandPath() {
if (Os.isFamily(Os.FAMILY_WINDOWS)) { if (OperatingSystem.current().isWindows()) {
return 'cocos.bat' return 'cocos.bat'
} }
else { else {

View File

@ -21,7 +21,7 @@
-dontwarn org.cocos2dx.** -dontwarn org.cocos2dx.**
-keep public class com.chukong.** { *; } -keep public class com.chukong.** { *; }
-dontwarn com.chukong.** -dontwarn com.chukong.**
-keep public com.huawei.android.** { *; } -keep public class com.huawei.android.** { *; }
-dontwarn com.huawei.android.** -dontwarn com.huawei.android.**
# Proguard Apache HTTP for release # Proguard Apache HTTP for release

View File

@ -1,5 +1,3 @@
import org.apache.tools.ant.taskdefs.condition.Os
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
android { android {