Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fail with "Failed to transform shapeless" error on ubuntu 21.04 #275

Open
emanuelb opened this issue May 28, 2021 · 0 comments
Open

Comments

@emanuelb
Copy link

Build fail with error:

> Task :app:checkReleaseDuplicateClasses FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:checkReleaseDuplicateClasses'.
> Could not resolve all files for configuration ':app:releaseRuntimeClasspath'.
   > Failed to transform shapeless_2.11-2.3.3.jar (com.chuusai:shapeless_2.11:2.3.3) to match attributes {artifactType=enumerated-runtime-classes, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for JetifyTransform: /home/appuser/.gradle/caches/modules-2/files-2.1/com.chuusai/shapeless_2.11/2.3.3/ea34d4b6128b9090386945dcb952816bd9e87ce2/shapeless_2.11-2.3.3.jar.
         > Failed to transform '/home/appuser/.gradle/caches/modules-2/files-2.1/com.chuusai/shapeless_2.11/2.3.3/ea34d4b6128b9090386945dcb952816bd9e87ce2/shapeless_2.11-2.3.3.jar' using Jetifier. Reason: InvalidPathException, message: Malformed input or input contains unmappable characters: shapeless/$tilde$qmark$greater$?.class. (Run with --stacktrace for more details.)
           Suggestions:
            - Check out existing issues at https://issuetracker.google.com/issues?q=componentid:460323&s=modified_time:desc, it's possible that this issue has already been filed there.
            - If this issue has not been filed, please report it at https://issuetracker.google.com/issues/new?component=460323 (run with --stacktrace and provide a stack trace if possible).

As the error show "Execution failed for JetifyTransform", removing the enableJetifier may be related and fix it, see issue for it at #274

Trying again result in same error in different task :app:kaptGenerateStubsReleaseKotlin

> Task :app:kaptGenerateStubsReleaseKotlin FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:kaptGenerateStubsReleaseKotlin'.
> Could not resolve all files for configuration ':app:releaseCompileClasspath'.
   > Failed to transform shapeless_2.11-2.3.3.jar (com.chuusai:shapeless_2.11:2.3.3) to match attributes {artifactType=android-classes-jar, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-api}.
      > Execution failed for JetifyTransform: /home/appuser/.gradle/caches/modules-2/files-2.1/com.chuusai/shapeless_2.11/2.3.3/ea34d4b6128b9090386945dcb952816bd9e87ce2/shapeless_2.11-2.3.3.jar.
         > Failed to transform '/home/appuser/.gradle/caches/modules-2/files-2.1/com.chuusai/shapeless_2.11/2.3.3/ea34d4b6128b9090386945dcb952816bd9e87ce2/shapeless_2.11-2.3.3.jar' using Jetifier. Reason: InvalidPathException, message: Malformed input or input contains unmappable characters: shapeless/$tilde$qmark$greater$?.class. (Run with --stacktrace for more details.)
           Suggestions:
            - Check out existing issues at https://issuetracker.google.com/issues?q=componentid:460323&s=modified_time:desc, it's possible that this issue has already been filed there.
            - If this issue has not been filed, please report it at https://issuetracker.google.com/issues/new?component=460323 (run with --stacktrace and provide a stack trace if possible).

Does the git checkout v0.4.12-android is correct for eclair repo? used it instead of git checkout android as it's mentioned in v0.4.16-MAINNET release notes under "Complete list of changes:":
https://github.com/ACINQ/eclair-mobile/releases/tag/v0.4.16-MAINNET

it was build with Cotnainerfile:

FROM ubuntu:21.04

RUN set -ex; \
    mkdir -p /usr/share/man/man1/; \
    apt-get update; \
    DEBIAN_FRONTEND=noninteractive apt-get install --yes -o APT::Install-Suggests=false --no-install-recommends \
        git \
        wget \
        unzip \
        maven \
        openjdk-11-jdk ; \
    rm -rf /var/lib/apt/lists/*; \
    useradd -ms /bin/bash appuser;
    
USER appuser

ENV ANDROID_HOME="/home/appuser/app/sdk" \
    ANDROID_SDK_ROOT="/home/appuser/app/sdk"

RUN set -ex; \
    mkdir -p "/home/appuser/app/sdk/licenses" "/home/appuser/app/eclair/"; \
    printf "\n24333f8a63b6825ea9c5514f83c2829b004d1fee" > "/home/appuser/app/sdk/licenses/android-sdk-license"; \
    printf "\n84831b9409646a918e30573bab4c9c91346d8abd" > "/home/appuser/app/sdk/licenses/android-sdk-preview-license"; \
    cd /home/appuser/app/sdk/; \
    wget https://dl.google.com/android/repository/commandlinetools-linux-7302050_latest.zip; \
    echo "7a00faadc0864f78edd8f4908a629a46d622375cbe2e5814e82934aebecdb622  commandlinetools-linux-7302050_latest.zip" | sha256sum -c; \
    unzip commandlinetools-linux-7302050_latest.zip; \
    rm commandlinetools-linux-7302050_latest.zip; \
    /home/appuser/app/sdk/cmdline-tools/bin/sdkmanager --sdk_root=/home/appuser/app/sdk/ --install --channel=1 "ndk-bundle" "ndk;23.0.7196353"; \
    cd /home/appuser/app/eclair/; \
    git clone https://github.com/ACINQ/eclair; \
    cd /home/appuser/app/eclair/eclair/; \
    git checkout v0.4.12-android; \
    mvn clean install -DskipTests; \
    cd /home/appuser/app/eclair; \
    git clone https://github.com/ACINQ/eclair-mobile; \
    cd /home/appuser/app/eclair/eclair-mobile; \
    git checkout v0.4.16-MAINNET;
    
WORKDIR /home/appuser/app/eclair/eclair-mobile/

RUN ./gradlew assembleRelease
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant