Repository navigation
Add gradle support for java bindings - #4512
Conversation
ScottTodd
left a comment
There was a problem hiding this comment.
For the failing Lint / tabs check, lets add .jar to https://github.com/google/iree/blob/176b5803d616f09002e6cea619363cf61688e406/scripts/check_tabs.sh#L24-L30
| main { | ||
| java.srcDirs = ['com/google/iree'] | ||
| jni.srcDirs = ['com/google/iree/native'] | ||
| manifest.srcFile '../javatests/com/google/iree/TestManifest.xml' |
There was a problem hiding this comment.
No change needed now, but we'll want to differentiate between test manifest files, sample app manifest files, and bindings manifest files later on.
| externalNativeBuild { | ||
| cmake { | ||
| path "../../CMakeLists.txt" | ||
| } | ||
| } |
There was a problem hiding this comment.
Can this path be included in the prior externalNativeBuild? Or are two externalNativeBuild definitions needed?
There was a problem hiding this comment.
I believe this needs to be separate because the previous externalNativeBuild was in a defaultConfig block, and the CMake path needs to be specified outside of that
| #!/usr/bin/env sh | ||
|
|
||
| # | ||
| # Copyright 2015 the original author or authors. |
There was a problem hiding this comment.
@GMNGeoffrey will this license header trigger any errors in our infrastructure? Maybe the files should live under a third_party/ directory?
For a bit of context on why these files are useful to check in, see https://stackoverflow.com/a/40981755
There was a problem hiding this comment.
They won't because I got annoyed and turned off these checks (the snr was terrible). That said, we should check third party code in only under a third_party/ directory
There was a problem hiding this comment.
Also I can't comment on the binary file because GitHub, but is checking in a jar necessary? I know git doesn't like binary files (although that one is pretty small)
There was a problem hiding this comment.
Checking in the jar or the other gradle files isn't necessary, I just included them because that seems to be the standard that many other projects follow (more info in the stackoverflow link Scott included). I can remove them if you would prefer, then anyone who wants to use the java api will just need to generate the files themselves
There was a problem hiding this comment.
This stuff should still go under third_party/. It's third party code we didn't write and has a different copyright
There was a problem hiding this comment.
Just sent out #4580 to remove these files
There was a problem hiding this comment.
Thanks :-) I think we should probably also put the jar there? Unless the jar is actually are code? I can't tell since it's, well, a binary 😁
I think even better, make that grep skip binary files using |
Checks in a build.gradle file for compiling an android library file, and updates the readme with instructions for how to generate the AAR on linux. Progress on #4464
gradlew, gradlew.bat, gradle/wrapper/gradle-wrapper.jar, and gradle/wrapper/gradle-wrapper.properties are all files generated by Android Studio. I am including them to keep with the convention most other apps seem to use (example https://github.com/tensorflow/examples/tree/master/lite/examples/image_classification/android)