Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ryansgot/ca11c0695a0ada7587001d147f24fe43 to your computer and use it in GitHub Desktop.
Save ryansgot/ca11c0695a0ada7587001d147f24fe43 to your computer and use it in GitHub Desktop.
Adding the forsuredbcompiler dependency
// Android
dependencies {
/* ... */
annotationProcessor "com.fsryan.forsuredb:forsuredbcompiler:$forsuredbversion"
/* ... */
}
// Java
// Note: You can do the below to manually set the annotation processing configuration or use one of
// the many plugins available for annotation processing
configurations {
apt
}
def generatedSources = new File(project.buildDir, "generated-src")
compileJava {
dependsOn clean
doFirst {
(generatedSources.exists() && generatedSources.isDirectory()) || generatedSources.mkdirs()
}
options.annotationProcessorPath = configurations.apt
options.compilerArgs = ['-s', "${generatedSources}"]
}
dependencies {
/* ... */
apt "com.fsryan.forsuredb:forsuredbcompiler:$forsuredbversion"
/* ... */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment