Base of code generators.
This project requires JDK 17 to compile and run.
void main() {
// load the cache
GeneratedFileCache cache = GeneratedFileCache.tryLoad(BASE_DIR, CACHE_FILE);
// write the file, if not cached
boolean written = cache.writeFile(FILE_PATH, FILE_CONTENT);
System.out.println("Is written: " + written);
// save the cache
cache.save();
}Where:
BASE_DIRis the base directory of all files in the cache (not the base directory of the cache)CACHE_FILEis the path to the cacheFILE_PATHis the path to the file to be writtenFILE_CONTENTis the content of the file
Introduce this dependency:
dependencies {
implementation("io.github.over-run:codegen-base:${codegenBaseVersion}")
}