forked from wikimedia/apps-android-wikipedia
-
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.
* Use java-mwapi Gradle project when available. Otherwise, use OSSHR module dependency. * Require JDK7 compilation. The Wikipedia Android app has transitioned from Maven to Gradle and it's time for the json library to do the same. It has become too burdensome to maintain a Maven repo and develop across multiple projects. This patch replaces the Maven Gradle module dependency with a Gradle Java project dependency, when present. Json library dependency patch: https://gerrit.wikimedia.org/r/#/c/223718/ Bug: T105235, T103051 Change-Id: I1ea910bfb1200f37980c46b2d8ae8b51b4cfed90
- Loading branch information
1 parent
826c282
commit 23c3bc4
Showing
3 changed files
with
41 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,19 @@ | ||
def fileExists = {String filename -> | ||
new File(filename).exists() | ||
} | ||
|
||
def hierarchyToFilename = { String hierarchy -> | ||
return hierarchy ? hierarchy.substring(1).replaceAll(':', File.separator) : hierarchy | ||
} | ||
|
||
def includeExists = { String projectPath, String name -> | ||
if (fileExists(hierarchyToFilename(projectPath))) { | ||
include projectPath | ||
|
||
// Replace a generic name like "lib". | ||
project(projectPath).name = name | ||
} | ||
} | ||
|
||
include ':wikipedia' | ||
includeExists ':java-mwapi:lib', 'json' |
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