Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make it possible to use a custom AAR to build servoapp
- Loading branch information
1 parent
e051c58
commit 8106e5e
Showing
3 changed files
with
40 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
configurations.maybeCreate("default") | ||
|
||
if (gradle.hasProperty('servoViewLocal')) { | ||
def aar = new File(gradle.servoViewLocal) | ||
if (aar.exists()) { | ||
artifacts.add('default', aar) | ||
} else { | ||
throw new GradleException('Failed to find ServoView AAR at: ' + gradle.servoViewLocal) | ||
} | ||
} else { | ||
throw new GradleException('Local ServoView AAR path not defined') | ||
} |
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,23 @@ | ||
include ':servoapp', ':servoview' | ||
include ':servoapp' | ||
|
||
def userPropertiesFile = new File('user.properties') | ||
if (userPropertiesFile.exists()) { | ||
println("Loading user.properties") | ||
def props = new Properties() | ||
userPropertiesFile.withInputStream { | ||
props.load(it) | ||
} | ||
props.each { prop -> | ||
println(prop.key + " = " + prop.value) | ||
gradle.ext.set(prop.key, prop.value) | ||
} | ||
if (gradle.hasProperty('servoViewLocal')) { | ||
println("Using local build of servoview") | ||
include ':servoview-local' | ||
project(':servoview-local').projectDir = new File('servoview-local') | ||
} else { | ||
include ':servoview' | ||
} | ||
} else { | ||
include ':servoview' | ||
} |