jmfayard
05/31/2023, 6:17 AMsomeBlock { ... }
The mindset shift : You don’t configure Gradle, you program it! … in Kotlin of course
Learning to program your build takes time initially, but much better than countless spending hours debugging your build if you don’t learn Gradle
https://blog.kotlin-academy.com/weeks-of-debugging-your-build-can-save-you-hours-of-learning-gradle-348de387c12cjmfayard
05/31/2023, 6:17 AMCies
05/31/2023, 8:27 AMCies
05/31/2023, 8:28 AMCies
05/31/2023, 8:28 AMjmfayard
05/31/2023, 9:09 AMWhat happened is that the dynamic nature of Groovy combined badly with all the meta-programming done in Gradle to give us poor tooling support.https://dev.to/jmfayard/how-kotlin-makes-editing-your-gradle-build-less-frustrating-232l
jmfayard
05/31/2023, 9:09 AMCies
05/31/2023, 10:03 AMCies
05/31/2023, 10:12 AMjmfayard
05/31/2023, 10:19 AMCies
05/31/2023, 10:20 AMCies
05/31/2023, 10:20 AMCies
05/31/2023, 10:21 AMCies
05/31/2023, 10:21 AMjmfayard
05/31/2023, 10:21 AMjmfayard
05/31/2023, 10:22 AMCies
05/31/2023, 10:22 AMCies
05/31/2023, 10:22 AMjmfayard
05/31/2023, 10:23 AMbuild.gradle.kts
file either.
The idea is to write a Gradle plugin in Kotlin
and then configure it simply in build.gradle.kts
jmfayard
05/31/2023, 10:23 AMCies
05/31/2023, 10:23 AMjmfayard
05/31/2023, 10:24 AMCies
05/31/2023, 10:24 AMbuild.gradle.kts
and the move it to a plugin when time comesCies
05/31/2023, 10:25 AMCies
05/31/2023, 10:25 AMCies
05/31/2023, 10:27 AMCies
05/31/2023, 10:27 AMrelink-views-js-to-public: ## Relink all JS files in app/views to public/scripts/template
@set -e; \
rm -rf public/scripts/template; \
mkdir public/scripts/template; \
echo "Emptied APP_ROOT/public/scripts/template"; \
for f in $$(find app/views -type f -name "*.js"); do \
link_target=public/scripts/template/$$(echo $$f | cut -d'/' -f3-); \
mkdir -p $$(dirname $$link_target); \
echo "Hard linked $$f -> $$link_target"; \
ln $$f $$link_target; \
done
Cies
05/31/2023, 10:28 AM