dart-lang / native

Dart packages related to FFI and native assets bundling.
BSD 3-Clause "New" or "Revised" License
112 stars 39 forks source link

Do not build artifacts in setup scripts if they are already built and newer than package. #749

Closed mahesh-hegde closed 1 year ago

mahesh-hegde commented 1 year ago

buildSummarizer() does this check before building summarizer. It checks the summarizer JAR and sources. If java sources have changed it will rebuild, otherwise skip the build.

Same should be probably done with maven scripts and jni:setup. This will speed up the tests significantly.

mahesh-hegde commented 1 year ago

Is it acceptable to write a json file in target directory? Because in some cases it's hard to determine whether to invoke maven, with only config information.

mahesh-hegde commented 1 year ago

Implemented this in jni:setup.

With mvn -q, it feels faster. Either printing takes more time (!) or the slowness is psychological.