Skip to content

Commit

Permalink
Auto generate on JavaCompile when files are not found
Browse files Browse the repository at this point in the history
  • Loading branch information
felldo committed Jan 27, 2024
1 parent 09613f9 commit 2e38a10
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,15 @@ tasks.withType<Javadoc> {
options.encoding = "UTF-8"
}

/*// Generate sources before compiling
//Generate sources before compiling if they do not exist
tasks.named("compileJava") {
}*/
if (!file("./build/generated/jemoji/net/fellbaum/jemoji/Emojis.java").exists()) {
dependsOn("generateJavaSourceFiles")
}
if (!file("./build/generated/jemoji/net/fellbaum/jemoji/EmojiDescriptionLanguage.java").exists()) {
dependsOn("generateEmojisDescription")
}
}

tasks.named("build") {
finalizedBy("copyJarToProject")
Expand Down
1 change: 1 addition & 0 deletions lib/src/main/java/net/fellbaum/jemoji/Emoji.java
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ public String getDescription() {
* Gets the description of this emoji in the specified language.
* May not be present for all languages.
*
* @param emojiDescriptionLanguage The language type the description should be searched for.
* @return The description of this emoji in the specified language.
*/
public Optional<String> getDescription(EmojiDescriptionLanguage emojiDescriptionLanguage) {
Expand Down

0 comments on commit 2e38a10

Please sign in to comment.