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

Error using gradle-profiler using Bazel with an iOS Project #492

Open
narlei opened this issue May 10, 2023 · 0 comments
Open

Error using gradle-profiler using Bazel with an iOS Project #492

narlei opened this issue May 10, 2023 · 0 comments

Comments

@narlei
Copy link

narlei commented May 10, 2023

We're currently using gradle.profiler in our Android projects and we're migrating our iOS project to work with Bazel.

Seeing the success of Android project benchmarking build using this tool, we tried to use it in our iOS project too, but I'm receiving this error:

❯ gradle-profiler --benchmark --bazel build_some_target

* Writing results to /Users/narlei.moreira/ifood-consumer-ios/profile-out-34

* Settings
Project dir: /Users/narlei.moreira/ifood-consumer-ios
Output dir: /Users/narlei.moreira/ifood-consumer-ios/profile-out-34
Profiler: none
Benchmark: true
Versions: []
Gradle User Home: /Users/narlei.moreira/ifood-consumer-ios/gradle-user-home
Targets: [build_some_target]

* Inspecting the build using its default Gradle version

* Stopping daemons
java.lang.ClassCastException: class org.gradle.profiler.BuildInvoker$1 cannot be cast to class org.gradle.profiler.GradleBuildInvoker (org.gradle.profiler.BuildInvoker$1 and org.gradle.profiler.GradleBuildInvoker are in unnamed module of loader 'app')
	at org.gradle.profiler.ScenarioLoader.adhocScenarios(ScenarioLoader.java:195)
	at org.gradle.profiler.ScenarioLoader.doLoadScenarios(ScenarioLoader.java:177)
	at org.gradle.profiler.ScenarioLoader.loadScenarios(ScenarioLoader.java:156)
	at org.gradle.profiler.Main.run(Main.java:56)
	at org.gradle.profiler.Main.main(Main.java:25)

I used the example of Readme:

build_some_target {
    tasks = ["assemble"]
    bazel {
        home = "MY_HOME"
        targets = ["build" "//MY_TARGET"]
    }
}

The iOS project doesn't use Gradle, then I created an empty settings.gradle.

❯ gradle-profiler --version
Gradle Profiler version 0.19.0

I deleted the .conf file and the error is the same. I believe that it's a pre-requisite missed. Maybe it doesn't works with iOS project.

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