-
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
j2objcXcode now dependency of j2objcBuild #524
Conversation
PTAL |
@@ -277,7 +277,7 @@ class J2objcPlugin implements Plugin<Project> { | |||
} | |||
lateDependsOn(project, 'build', 'j2objcBuild') | |||
|
|||
// TODO: Where shall we fit this task in the plugin lifecycle? | |||
// TODO: make this a dependency of j2objcBuild |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to just go ahead and do this?
1438925
to
3b087fb
Compare
Please add a comment to CHANGELOG.md also; LGTM when passes. |
|
||
@Input | ||
// List of all dependencies | ||
List<PodspecDetails> getPodspecDependencies() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class PodspecDetails must be modified as follows to be an input:
@EqualsAndHashCode
static class PodspecDetails implements Serializable {
...
private static final long serialVersionUID = 1L
...
}
@advayDev1 - it also required implementing |
|
Aha: you don't have a default no-arg constructor for PodspecDetails. Ok this makes sense now |
I expect that Gradle is comparing Serialized binary to Serialized binary, that way that can get consistent behaviour over time and across daemon runs - they can't keep the object around in memory. The writeDefaultObject is a necessary part of serialization. |
I'd still suggest using @EqualsAndHashCode - we don't know what the implementation detail of Gradle is (I looked briefly, couldn't find it). Understood about writeDefaultObject, the point of @AutoExternalizable is to do that for you. (I'm still trying to figure out why I don't need AutoExternalizable nor implementations of Serializable - but that is an aside). |
j2objcXcode: - skips task if xcodeProjectDir is not set - @input for project dependencies - PodspecDetails is now serializable so it can be used for @input - Cocoapods 0.39.0 is now installed in Travis build on OS X Other changes: - xcodeTargetsIos added to multiProject1 - j2objcPodspec now depends on j2objcPreBuild - j2objcXcode now depends on j2objcPodspec - j2objcAssemble now depends on j2objcXcode
I've added back @EqualsAndHashCode. Since the serialization is working (and is tested), I'm fine with doing it the Java way with writeDefaultObject(). One concern I have is that getPodspecDependencies() is called 2-3 times during the gradle run. I'm surprised that this happens. Dependending on how large the dependency trees become, this may need caching. I'll merge this once the build is green. |
sg - LGTM |
j2objcXcode now dependency of j2objcBuild
j2objcXcode:
Other changes: