Open pjcollins opened 3 weeks ago
Opening this up for some initial feedback, though I am still working on issues related to dotnet pack.
How does this handle dependencies? Let's say my gradle
project depends on org.jetbrains.kotlin:kotlin-stdlib:2.0.0
.
Is this:
How does this handle dependencies? Let's say my
gradle
project depends onorg.jetbrains.kotlin:kotlin-stdlib:2.0.0
.Is this:
- Dependency is left entirely up to the user, in this case they would need to add our NuGet package to their project.
- Native dependency is automatically included, which would conflict with any usage of our NuGet package.
- Something else?
There is currently no dependency management functionality, it's left up to the user to figure out what is needed and what is best. This is a scenario I am hoping we can try to improve in the future, perhaps through recommending some combination of NuGet or AndroidMavenLibrary references. There are also likely different use cases for application vs library projects where we could potentially try to do some automatic dependency inclusion in the former case.
Looks nice 😄 It might be worth doing a blog post for this to show people how to use it 😄
We have a "v1" of sorts out in https://github.com/CommunityToolkit/Maui.NativeLibraryInterop and https://learn.microsoft.com/en-us/dotnet/communitytoolkit/maui/native-library-interop , and will be planning to update these with this functionality when it's available
There is currently no dependency management functionality, it's left up to the user to figure out what is needed and what is best. This is a scenario I am hoping we can try to improve in the future, perhaps through recommending some combination of NuGet or AndroidMavenLibrary references.
If a .pom
file is produced by the gradle
project, adding it to the AndroidLibrary
with the Manifest
attribute will opt-into our Java dependency verification which would provide dependency enforcement and NuGet package suggestions:
There is currently no dependency management functionality, it's left up to the user to figure out what is needed and what is best. This is a scenario I am hoping we can try to improve in the future, perhaps through recommending some combination of NuGet or AndroidMavenLibrary references.
If a
.pom
file is produced by thegradle
project, adding it to theAndroidLibrary
with theManifest
attribute will opt-into our Java dependency verification which would provide dependency enforcement and NuGet package suggestions:
Excellent, I will try to look into this after the initial work lands.
Context: https://github.com/CommunityToolkit/Maui.NativeLibraryInterop
Introduces an
@(AndroidGradleProject)
build action which can be used to build and consume the outputs of Android Gradle projects.The following metadata is supported on this item:
The ItemSpec or
Include
attribute should be the path to the rootbuild.gradle
file of the project, next togradlew
wrapper scripts.If the
@(AndroidGradleProject)
declares a library module that produces an AAR, that AAR will be added as an@(AndroidLibrary)
item automatically.The
Bind
,Pack
, andVisible
metadata will be applied to the@(AndroidLibrary)
item if it is created, using the defaults outlined above.A new
$(AndroidPrepareForBuildDependsOn)
build extension point has been added to allow customer projects to more easily hook into the beginning of the build process.