google / protobuf-gradle-plugin

Protobuf Plugin for Gradle
Other
1.77k stars 273 forks source link

Exclude a file thats not a proto file. #710

Open johnnyzen opened 1 year ago

johnnyzen commented 1 year ago

Android Studio Plugin : com.google.protobuf:protobuf-gradle-plugin:0.9.0

Hi all,

I am trying to exclude a file that is within the proto folder, as I getting an error:

WARNING T:\src\github\protobuf\src\google\protobuf\compiler\parser.cc:647] No syntax specified for the proto file: .editorconfig.

within the android block, I am trying to exclude this file by adding exclude:

sourceSets { main { proto { srcDir 'src/main/cloud-proto/' exclude '.editorconfig' } proto { srcDir 'src/main/custom-proto/' } } }

Is this the right approach?

hijamoya commented 1 year ago

Same problem here, after upgrading to gradle 8.0, the plugin start to compile non proto files which does not happen in gradle 7.4.