At droidcon the build panel folks talked about a c...
# squarelibraries
u
At droidcon the build panel folks talked about a cli tool to generate new module (structure, defaults etc). Is this a gradle job or would shell script be better suited or something else?
j
cp -R
? blob grin
yes black 1
I don't think it matters , whatever is most comfortable for you to write with
u
so you’d not be mad if someone say imposed python dependency on you in order to use it?
j
If you already have a culture of Python then no
I'd probably consider a single-file Java program if it were me deciding
u
no all tasks related to the repo are currently in gradle tasks / gradle plugins (importing translations, decrypting secrets etc)
and would you then commit the fatjar to git or always build it?
j
Java runs source files now for a few years
It compiles it only the fly. Like Kotlin script but not slow
u
wait what? 😁 thats news thanks .. can it maybe be kotlin?
anyways you’d run it directly, not via gradle?
j
Kotlin supports it, too
u
thats neat, never occured to me btw so no gradle? if its never going be a dependency to anything.. sounds like a no but then the importing of translations currently is a gradle task and its basically just moving files and I never questioned it
j
I mean Gradle is fine, but it's a heavy thing to run just to copy files. Java or Kotlin will already do things like abstracting over platform differences with things like the file system
u
im looking at the pure java cli way, and I’d maybe like to pick options with arrows sort of like claude code .. and that probably means a dpendency - and then it cannot be a single file compiled on the fly right?
j
Correct
u
if it was the case and I needed a jar, then would you frown upon commiting that to git?
j
We used to commit dependency-tree-diff as a jar. It was small enough
u
okay so if its few kb then its fine even if binary, thanks!
https://developer.squareup.com/blog/surfacing-hidden-change-to-pull-requests/ btw about this, the manifest differ, any chance that was open sourced like the dependency tree diff?
j
It's just regular diff tool
💯 1
The manifest is already formatted
u
curious, in the ci job, do you switch branches to the target, calculate all the stuff and then switch back? or is it pre populated in some s3 type storage?
j
They are persisted to object storage like S3 keyed by the hash so we can trivially look it up
u
can the hash simply be git commit of the last common ancestor of pr source branch and target branch?
j
The hash is the commit hash. We look up the old hash value by getting the merge-base which is what you describe, and then look up the manifest and dependency tree and stuff for that old hash.
u
neat, thanks! also thank you for moderating the other panel 😁
g
Just share our experience. We used script before for this. But now we use our own Idea plugin to generate anew module with all the settings which we need, it works really well for the team, everyone uses it, because it's easy and integrated into IDE module creation dialog It allows us to add a lot of additional options that are harder to use or just harder to discover comparing to our old script setup
e
a while back, I set up our CI to save some computed data (like dependency tree) in git notes. seems to be working well so far, no additional storage service needed