-
Notifications
You must be signed in to change notification settings - Fork 526
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
-t:InstallAndroidDependencies could use a reasonable default AndroidSdkDirectory if not specified #9160
Comments
On the one hand, are we? We've been quite reluctant to actually do so until now, for a variety of reasons. On the other hand, a default would help immensely. I'm inclined to take a page out of Lines 16 to 18 in 654440b
and for
and similarly for
|
For the Android SDK path itself, I can see being rather opinionated on a specific location for our own purposes. For JDK, I am a little more skeptical, since the easy path is downloading the microsoft openjdk installer, which defaults to a known location already. Why wouldn't we use this? |
Because it's another manual step. Current world order: 4 manual steps:
Desired world order: one less manual step:
|
My concern is for "clean" machines which don't have previous dependencies, and for which we aren't relying on the Visual Studio installer to install everything needed. |
In the spirit of 'clean' machines I think it's important to use the conventions from the pkg/msi installers even if we aren't going to use them directly. I guess I'm not ultimately opinionated on using the official installer vs installing through the
Then of course the point of this issue is providing sensible defaults when no directory is specified, which although this issue was about AndroidSdkDirectory specifically, the conversation has also come in around JavaSdkDirectory too. Again here, we should infer a sensible default in my opinion, if none is specified, and we should also skip trying to install the JDK at all if we can locate one ourselves that is already installed and compatible. |
@Redth: we should update our docs to tell people to install OpenJDK, and to not provide We should also verify that it works when we do so. If it doesn't work, that's a bug. |
For .NET 9 Preview 7, Edited to completely reverse the logic: |
Android framework version
net8.0-android, net9.0-android
Affected platform version
macOS, Windows (presumably)
Description
When running
dotnet build -t:InstallAndroidDependencies
I must set a path to the Android SDK (eg:-p:AndroidSdkDirectory=/Users/username/Android/sdk
).Could we assume a reasonable default path for this variable if none is specified in this build task? We are likely going to provide guidance to a user to use the same path always, why not pick that by default?
The text was updated successfully, but these errors were encountered: