forked from google/protobuf-gradle-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix support with Gradle 5.x/Android 2.5+; add Gradle 5.1 and drop Gra…
…dle 3.0 in tests. (google#287) - `gradle/wrapper/gradle-wrapper.properties`: the Protobuf plugin is now built with Gradle 5.1 - `ProtobufPlugin.groovy`: fixed a bug where GenerateProtoTask may "include" the wrong directory when running with Android plugin >= 2.5. - The bug: `addGenerateProtoTask()` always use the directory per *sourceSet* as input (original line 328), but with Android plugin >= 2.5, the extract task writes to the directory per *variant* (original line 272), thus they don't match. The GenerateProtoTask ends up using a nonexistent directory as an input. We didn't catch it in tests because the integration tests were only run with Android plugin up to 2.3. However, Gradle produced a warning about missing input directory, which becomes an error on Gradle 5.0 (google#253). Adding Gradle 5.1 and Android 3.1.0 to the test reproduces this bug. - The fix refactored the file and moved the assigning of inputs closer to where the extract task is created. This makes sure the input of the generate task matches the output of the extract task. - Updated tests - Added Gradle 5.1/Android 3.1.0 to tests, and removed Gradle 2.14.1 the oldest version on the tested list, raising the minimum supported version to Gradle 3.0. Removed code paths dedicated to Gradle <3.0. - Gradle 3.0/Android 2.2.0 is commented out from the list because of gradle/gradle#8158. I have verified this pair passes the tests if it's the only one in the list, presumably bypassing the Gradle issue.
- Loading branch information
1 parent
87b3cae
commit 8d0b8db
Showing
10 changed files
with
83 additions
and
77 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
rootProject.name = 'testProjectAndroid' |
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
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