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

EAS is reporting gradlew :app:assembleDebug builds to be "release" builds #2105

Closed
viljark opened this issue Oct 31, 2023 · 3 comments
Closed
Labels
needs review Issue is ready to be reviewed by a maintainer

Comments

@viljark
Copy link

viljark commented Oct 31, 2023

Build/Submit details page URL

https://expo.dev/accounts/rematocorp/projects/remato-sm-dev/builds/41fdeb9a-f44a-4669-a1ff-43a2146797cf

Summary

Expo EAS is reporting gradlew :app:assembleDebug builds to be "release" builds, for example in this app.gradle.

This code in if gets executed in builds with development client, is this a regression on EAS side?

android {
    purgeBackgroundGeolocationDebugResources(applicationVariants)
}

def purgeBackgroundGeolocationDebugResources(applicationVariants) {
    applicationVariants.all { variant ->
        if (variant.buildType.name == "release") {
            println("[react-native-background-geolocation] Purging debug resources in release build")
            variant.mergeResourcesProvider.configure {
                doLast {
                    delete(fileTree(dir: outputDir, includes: ["raw_tslocationmanager*"]))
                }
            }
        }
    }
}

Relevant logs

Running 'gradlew :app:assembleDebug' in /home/expo/workingdir/build/android

> Configure project :app

 :information_source:  Applying gradle plugin 'expo-dev-launcher-gradle-plugin' ([email protected])

 :information_source:  Applying gradle plugin 'expo-updates-gradle-plugin' ([email protected])

Minifying disabled for variant debug, no upload task created

[react-native-background-geolocation] Purging debug resources in release build

Minifying disabled for variant release, no upload task created

Managed or bare?

bare (prebuild)

Environment

expo-env-info 1.0.5 environment info:
System:
OS: macOS 13.0
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.17.1 - ~/.nvm/versions/node/v18.17.1/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v18.17.1/bin/yarn
npm: 9.6.7 - ~/.nvm/versions/node/v18.17.1/bin/npm
Managers:
CocoaPods: 1.12.1 - /opt/homebrew/lib/ruby/gems/3.1.0/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
IDEs:
Android Studio: 2022.3 AI-223.8836.35.2231.10406996
Xcode: 14.3.1/14E300c - /usr/bin/xcodebuild
npmPackages:
expo: ^49.0.0 => 49.0.16
react: 18.2.0 => 18.2.0
react-dom: 18.2.0 => 18.2.0
react-native: 0.72.6 => 0.72.6
react-native-web: ~0.19.6 => 0.19.9
npmGlobalPackages:
eas-cli: 5.5.0
expo-cli: 6.3.10
Expo Workflow: bare

Error output

No response

Reproducible demo or steps to reproduce from a blank project

Create new Expo SDK 49 project with react-native-background-geolocation installed:
https://github.com/transistorsoft/react-native-background-geolocation/blob/master/help/INSTALL-EXPO.md

run a build with development client ("developmentClient": true, in eas.json)

@viljark viljark added the needs review Issue is ready to be reviewed by a maintainer label Oct 31, 2023
@brentvatne
Copy link
Member

the developmentClient field sets the release to a debug build, thus Running 'gradlew :app:assembleDebug'

https://docs.expo.dev/eas/json/#developmentclient

@viljark
Copy link
Author

viljark commented Nov 1, 2023

@brentvatne how come variant.buildType.name is "release" then? Or is this a misconfiguration on the geolocation library side to use variant.buildType.name to detect debug builds? It is causing me issues using react-native-geolocation, see transistorsoft/react-native-background-geolocation#1867 (comment) and the maintainer tells this is expo issue.

@brentvatne
Copy link
Member

image

from your logs, it appears that react-native-background-geolocation is detecting this as neither a debug nor release build.

how come variant.buildType.name is "release" then? Or is this a misconfiguration on the geolocation library side to use variant.buildType.name to detect debug builds?

that could be the case! i don't know much about this library.

you can see pretty transparently what eas build is doing for you:

Running 'gradlew :app:assembleDebug' in /home/expo/workingdir/build/android

if you want to debug this locally further, you can run npx expo prebuild -p android and inspect the results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review Issue is ready to be reviewed by a maintainer
Projects
None yet
Development

No branches or pull requests

2 participants