Skip to content

Update Gradle example deeplearning4j-examples to support Kotlin DSL with the latest Gradle v6.3 #963

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

Open
loxal opened this issue Mar 25, 2020 · 3 comments
Assignees

Comments

@loxal
Copy link
Contributor

loxal commented Mar 25, 2020

I could provide you with a corresponding pull request and wanted to check if this is actually wanted before I waste my time...

I could refactor build.gradle to build.gradle.kts that supports the statically typed Kotlin DSL and runs without deprecation warnings with the latest version of Gradle.

Also the idiomatic way shipping Gradle projects is actually committing the Gradle binary into the repository. This might not be needed for Maven which remains API stable for years. However what runs with gradlew build on your computer will much more likely not run on my or even on your own just 6 months later. Therefore it is highly advisable to ship the Gradle binary to avoid frustration for people "who just want to evaluate..." :)

@saudet
Copy link
Contributor

saudet commented Apr 2, 2020

@RobAltena is about to start working on that for Android, but a Gradle build for the rest of the examples would obviously be also welcome.

Note that because of restrictions from Eclipse, we cannot put binary blobs in this repository. In any case, please open a pull request if/when you have something to review! Thanks

BTW, @treo, @eraly and others have started to refactor the examples in another repository, so you might want to start working on that with them there instead:
https://github.com/KonduitAI/deeplearning4j-examples-refactor

@RobAltena
Copy link
Contributor

Hello, thanks for helping out. Now I am quite new to Gradle. Can I ask if this is what you are proposing to add?
https://docs.gradle.org/current/userguide/gradle_wrapper.html

@loxal
Copy link
Contributor Author

loxal commented Apr 2, 2020

@RobAltena Yes, it is. It's basically all about shipping the blob of a very fast moving build tool. Alternatively a specific Gradle version should be mentioned that successfully build the project. A blob-less approach would be to commit just ./gradle/wrapper/gradle-wrapper.properties.

@saudet thanks, but all of their examples seem to be based on Maven.

So I will try to provide you with a corresponding PR for this issue by the end of this week. If I should not provide any feedback or a PR by then, consider this issue abandoned (by me).

loxal added a commit to loxal/deeplearning4j-examples that referenced this issue Apr 20, 2020
…L with the latest Gradle v6.3

* provide specific & tested Gradle version to guarantee a working example
* convert dynamically-typed Gradle script to statically-typed Kotlin DSL
* update dependencies
* cleanup imports

Signed-off-by: Alex <alexander.orlov@loxal.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants