Skip to content

Commit

Permalink
Hide samples source code inside a build variant
Browse files Browse the repository at this point in the history
This prevents the code from being seeing under normal circunstances in
Android Studio
  • Loading branch information
rlazo committed Jul 9, 2024
1 parent 022ed03 commit a03f151
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion generativeai-android-sample/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@ android {
}
}

sourceSets.getByName("main") {
buildTypes {
create("samples") {
initWith(getByName("debug"))
}
}

sourceSets.getByName("samples") {
java.setSrcDirs(listOf("src/main/java", "src/main/kotlin", "../../samples/src/main/java"))
}

Expand Down

0 comments on commit a03f151

Please sign in to comment.