-
Notifications
You must be signed in to change notification settings - Fork 43
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
Auto Resolve Dependencies #41
Comments
@advayDev1 I suppose you know more about this? |
Can you be more specific about what you mean by dependencies? Are these transitive dependencies of the instant jars on other jars? |
@advayDev1 I mean transitive dependencies. |
I mean that they should be resolved like in:
|
are you asking for:
|
No to make it simple. I want that our plugin auto resolves transitive dependencies. That's it. |
I don't know if we should do that. I know in my case it would actually be harmful, and I can imagine it would be for many people. Consider that your projectA uses libB. libB relies on Guava. With this, we would use the public Guava jar as referenced in libB's pom file (for example), but that would be wrong, we should instead use the guava in the j2objc dist library. This could happen for any library. There is no way to map say a Maven pom file transitive dependency to the name in the j2objc lib directory (afaik). I assume you want this to make --build-closure easier to manage, as it would be for me as well. But as soon as I started doing something that wasn't simple (for example, in my case my projectA relies on libB which relies on libC which has some JNI components that I then had to create a libCModified version myself which stubs or replaces with OCNI those JNI components), it did not work to do it automatically. |
So, the right way to do this is use: they can just be added to translateClasspath. Also, #112 does not need to be done to do this, only nice-to-have. Need to solve #180 because otherwise the junit.jar for example we reference in the translateClasspath may be of a different version than the junit.jar in the j2objc dist. |
Dependency configuration happens in 2 phases: - Dependency conversion: This converts your compile and testCompile dependencies into equivalent j2objcTranslate and j2objcLink dependencies. Namely local jars are copied to j2objcTranslate, external Maven jars are converted into their 'sources' form and copied to j2objcTranslate, and projects are copied to j2objcLink (they don't need translation). This phase is optional and controlled by j2objcConfig.autoConfigureDeps - Dependency resolution: This phase converts j2objcTranslate and j2objcLink deps into actual j2objc commands. Any source jar on j2objcTranslate is added to translateSourcepaths with --build-closure. Any project on j2objcLink is added to translateClasspaths and has its final j2objc static library linked in to this project's objective c code. This phase always runs. If your dependencies are too complicated for the plugin to figure out in the first phase, keep autoConfigureDeps=false, and just add the appropriate projets, jars, and libraries here. Also adds system tests for both project and external Maven dependencies. j2objc-contrib#180; Fixes j2objc-contrib#41; Fixes j2objc-contrib#372 TESTED=yes
Dependency configuration happens in 2 phases: - Dependency conversion: This converts your compile and testCompile dependencies into equivalent j2objcTranslate and j2objcLink dependencies. Namely local jars are copied to j2objcTranslate, external Maven jars are converted into their 'sources' form and copied to j2objcTranslate, and projects are copied to j2objcLink (they don't need translation). This phase is optional and controlled by j2objcConfig.autoConfigureDeps - Dependency resolution: This phase converts j2objcTranslate and j2objcLink deps into actual j2objc commands. Any source jar on j2objcTranslate is added to translateSourcepaths with --build-closure. Any project on j2objcLink is added to translateClasspaths and has its final j2objc static library linked in to this project's objective c code. This phase always runs. If your dependencies are too complicated for the plugin to figure out in the first phase, keep autoConfigureDeps=false, and just add the appropriate projets, jars, and libraries here. Also adds system tests for both project and external Maven dependencies. j2objc-contrib#180; Fixes j2objc-contrib#41; Fixes j2objc-contrib#372 TESTED=yes
Dependency configuration happens in 2 phases: - Dependency conversion: This converts your compile and testCompile dependencies into equivalent j2objcTranslate and j2objcLink dependencies. Namely local jars are copied to j2objcTranslate, external Maven jars are converted into their 'sources' form and copied to j2objcTranslate, and projects are copied to j2objcLink (they don't need translation). This phase is optional and controlled by j2objcConfig.autoConfigureDeps - Dependency resolution: This phase converts j2objcTranslate and j2objcLink deps into actual j2objc commands. Any source jar on j2objcTranslate is added to translateSourcepaths with --build-closure. Any project on j2objcLink is added to translateClasspaths and has its final j2objc static library linked in to this project's objective c code. This phase always runs. If your dependencies are too complicated for the plugin to figure out in the first phase, keep autoConfigureDeps=false, and just add the appropriate projets, jars, and libraries here. Also adds system tests for both project and external Maven dependencies. j2objc-contrib#180; Fixes j2objc-contrib#41; Fixes j2objc-contrib#372 TESTED=yes
Dependency configuration happens in 2 phases: - Dependency conversion: This converts your compile and testCompile dependencies into equivalent j2objcTranslate and j2objcLink dependencies. Namely local jars are copied to j2objcTranslate, external Maven jars are converted into their 'sources' form and copied to j2objcTranslate, and projects are copied to j2objcLink (they don't need translation). This phase is optional and controlled by j2objcConfig.autoConfigureDeps - Dependency resolution: This phase converts j2objcTranslate and j2objcLink deps into actual j2objc commands. Any source jar on j2objcTranslate is added to translateSourcepaths with --build-closure. Any project on j2objcLink is added to translateClasspaths and has its final j2objc static library linked in to this project's objective c code. This phase always runs. If your dependencies are too complicated for the plugin to figure out in the first phase, keep autoConfigureDeps=false, and just add the appropriate projets, jars, and libraries here. Also adds system tests for both project and external Maven dependencies. j2objc-contrib#180; Fixes j2objc-contrib#41; Fixes j2objc-contrib#372 TESTED=yes
Dependency configuration happens in 2 phases: - Dependency conversion: This converts your compile and testCompile dependencies into equivalent j2objcTranslate and j2objcLink dependencies. Namely local jars are copied to j2objcTranslate, external Maven jars are converted into their 'sources' form and copied to j2objcTranslate, and projects are copied to j2objcLink (they don't need translation). This phase is optional and controlled by j2objcConfig.autoConfigureDeps - Dependency resolution: This phase converts j2objcTranslate and j2objcLink deps into actual j2objc commands. Any source jar on j2objcTranslate is added to translateSourcepaths with --build-closure. Any project on j2objcLink is added to translateClasspaths and has its final j2objc static library linked in to this project's objective c code. This phase always runs. If your dependencies are too complicated for the plugin to figure out in the first phase, keep autoConfigureDeps=false, and just add the appropriate projets, jars, and libraries here. Also adds system tests for both project and external Maven dependencies. j2objc-contrib#180; Fixes j2objc-contrib#41; Fixes j2objc-contrib#372 TESTED=yes
Dependency configuration happens in 2 phases: - Dependency conversion: This converts your compile and testCompile dependencies into equivalent j2objcTranslation and j2objcLinkage dependencies. Namely local jars are copied to j2objcTranslation, external Maven jars are converted into their 'sources' form and copied to j2objcTranslation, and projects are copied to j2objcLinkage (they don't need translation). This phase is optional and controlled by j2objcConfig.autoConfigureDeps - Dependency resolution: This phase converts j2objcTranslation and j2objcLinkage deps into actual j2objc commands. Any source jar on j2objcTranslation is added to translateSourcepaths with --build-closure. Any project on j2objcLinkage is added to translateClasspaths and has its final j2objc static library linked in to this project's objective c code. This phase always runs. If your dependencies are too complicated for the plugin to figure out in the first phase, keep autoConfigureDeps=false, and just add the appropriate projets, jars, and libraries here. Also adds system tests for both project and external Maven dependencies. issue j2objc-contrib#180; Fixes j2objc-contrib#41; Fixes j2objc-contrib#372 TESTED=yes
When using:
the dependencies should be resolved automatically.
The text was updated successfully, but these errors were encountered: