diff --git a/.circleci/docker/build.sh b/.circleci/docker/build.sh index 7a778d9a0eb..99d9cb19eff 100755 --- a/.circleci/docker/build.sh +++ b/.circleci/docker/build.sh @@ -139,7 +139,7 @@ case "$image" in PROTOBUF=yes ANDROID=yes ANDROID_NDK_VERSION=r19c - GRADLE_VERSION=6.5 + GRADLE_VERSION=4.10.3 CMAKE_VERSION=3.7.0 NINJA_VERSION=1.9.0 ;; diff --git a/.circleci/scripts/build_android_gradle.sh b/.circleci/scripts/build_android_gradle.sh index fb7c4a43ace..3d97a4faa32 100755 --- a/.circleci/scripts/build_android_gradle.sh +++ b/.circleci/scripts/build_android_gradle.sh @@ -6,7 +6,7 @@ export ANDROID_HOME=/opt/android/sdk # Must be in sync with GRADLE_VERSION in docker image for android # https://github.com/pietern/pytorch-dockerfiles/blob/master/build.sh#L155 -export GRADLE_VERSION=6.5 +export GRADLE_VERSION=4.10.3 export GRADLE_HOME=/opt/gradle/gradle-$GRADLE_VERSION export GRADLE_PATH=$GRADLE_HOME/bin/gradle diff --git a/android/build.gradle b/android/build.gradle index 4a6911eb99d..96979361637 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -25,7 +25,7 @@ allprojects { } dependencies { - classpath 'com.android.tools.build:gradle:4.2.0-alpha01' + classpath 'com.android.tools.build:gradle:3.3.2' classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:${GRADLE_BINTRAY_PLUGIN_VERSION}" classpath "com.github.dcendents:android-maven-gradle-plugin:${ANDROID_MAVEN_GRADLE_PLUGIN_VERSION}" classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.9.8" diff --git a/android/test_app/app/build.gradle b/android/test_app/app/build.gradle index c351f6c8049..a693f4c7720 100644 --- a/android/test_app/app/build.gradle +++ b/android/test_app/app/build.gradle @@ -66,7 +66,7 @@ android { } resnet18 { dimension "model" - applicationIdSuffix ".resnet18" + applicationIdSuffix ".resneti18" buildConfigField("String", "MODULE_ASSET_NAME", "\"resnet18.pt\"") addManifestPlaceholders([APP_NAME: "RN18"]) buildConfigField("String", "LOGCAT_TAG", "\"pytorch-resnet18\"") diff --git a/scripts/build_pytorch_android.sh b/scripts/build_pytorch_android.sh index 1f35a3d3d03..3ebc6ba82da 100755 --- a/scripts/build_pytorch_android.sh +++ b/scripts/build_pytorch_android.sh @@ -41,7 +41,9 @@ build_android # systemProp.https.proxyPort=8080 if [ "$CUSTOM_ABIS_LIST" = true ]; then - $GRADLE_PATH -PABI_FILTERS=$ABIS_LIST -p $PYTORCH_ANDROID_DIR clean assembleRelease + # Skipping clean task here as android gradle plugin 3.3.2 exteralNativeBuild has problems + # with it when abiFilters are specified. + $GRADLE_PATH -PABI_FILTERS=$ABIS_LIST -p $PYTORCH_ANDROID_DIR assembleRelease else $GRADLE_PATH -p $PYTORCH_ANDROID_DIR clean assembleRelease fi