Skip to content

Commit

Permalink
Add description for non-Java/Kotlin projects.
Browse files Browse the repository at this point in the history
  • Loading branch information
voidzcy committed Jan 3, 2020
1 parent 1621b4f commit de9a514
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,24 @@ changed by setting the ``outputSubDir`` property in the ``builtins`` or
}
```

#### For non-Java/Kotlin projects

Java and Kotlin are the first class supported languages, generated code will be
automatically added for compilation. For projects in other languages, you need
to manually add generated code to the sourceSets based on the language plugin's
configuration. The following example adds generated Scala code (by
[ScalaPB](https://scalapb.github.io/)) to the `main` sourceSet with `scala` plugin:

```gradle
sourceSets {
main {
scala {
srcDirs "${protobuf.generatedFilesBaseDir}/main/scalapb"
}
}
}
```

### Protos in dependencies

If a Java project contains proto files, they will be packaged in the jar files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ import org.gradle.api.file.SourceDirectorySet
import org.gradle.api.internal.file.DefaultSourceDirectorySet
import org.gradle.api.internal.file.FileResolver
import org.gradle.api.internal.file.collections.DefaultDirectoryFileTreeFactory
import org.gradle.api.logging.LogLevel
import org.gradle.api.plugins.AppliedPlugin
import org.gradle.api.tasks.SourceSet

Expand Down

0 comments on commit de9a514

Please sign in to comment.