Last active
May 10, 2018 21:23
-
-
Save ryansgot/ca11c0695a0ada7587001d147f24fe43 to your computer and use it in GitHub Desktop.
Adding the forsuredbcompiler dependency
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Android | |
dependencies { | |
/* ... */ | |
annotationProcessor "com.fsryan.forsuredb:forsuredbcompiler:$forsuredbversion" | |
/* ... */ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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