mirror of
https://github.com/letic/dashkiosk-android.git
synced 2024-10-07 19:21:16 +00:00
4ddd274cc7
- Upgrade XWalk to 22 - Try to disable requirement for user gesture to play media on the Webview in different part of the code
92 lines
2.6 KiB
Groovy
92 lines
2.6 KiB
Groovy
buildscript {
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.12.+'
|
|
classpath 'com.android.tools.build:gradle:2.2.2'
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
maven {
|
|
url 'https://download.01.org/crosswalk/releases/crosswalk/android/maven2'
|
|
}
|
|
}
|
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
dependencies {
|
|
compile 'org.xwalk:xwalk_core_library:22.+'
|
|
}
|
|
|
|
allprojects {
|
|
gradle.projectsEvaluated {
|
|
tasks.withType(JavaCompile) {
|
|
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
|
|
}
|
|
}
|
|
}
|
|
|
|
android {
|
|
sourceSets {
|
|
main {
|
|
manifest.srcFile 'AndroidManifest.xml'
|
|
java.srcDirs = ['src']
|
|
resources.srcDirs = ['src']
|
|
aidl.srcDirs = ['src']
|
|
renderscript.srcDirs = ['src']
|
|
res.srcDirs = ['res']
|
|
assets.srcDirs = ['assets']
|
|
}
|
|
}
|
|
|
|
compileSdkVersion 21
|
|
buildToolsVersion "21.1.2"
|
|
|
|
File localPropertiesFile = rootProject.file('local.properties')
|
|
if (localPropertiesFile.exists()) {
|
|
Properties localProperties = new Properties()
|
|
localProperties.load(new FileInputStream(localPropertiesFile))
|
|
if (localProperties.getProperty("key.store")) {
|
|
signingConfigs {
|
|
release {
|
|
storeFile file(localProperties.getProperty("key.store"))
|
|
keyAlias localProperties.getProperty("key.alias", "dashkiosk")
|
|
storePassword localProperties.getProperty("key.store.password", "")
|
|
keyPassword localProperties.getProperty("key.alias.password", "")
|
|
}
|
|
}
|
|
buildTypes {
|
|
release {
|
|
signingConfig signingConfigs.release
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
// Ask for passwords when signing
|
|
task askForPasswords << {
|
|
if (android.hasProperty("signingConfigs") && android.signingConfigs.hasProperty("release")) {
|
|
if (android.signingConfigs.release.storePassword == "") {
|
|
android.signingConfigs.release.storePassword = new String(System.console().readPassword("\n** Keystore password: "))
|
|
}
|
|
if (android.signingConfigs.release.keyPassword == "") {
|
|
android.signingConfigs.release.keyPassword = new String(System.console().readPassword("\n** Key password: "))
|
|
}
|
|
}
|
|
}
|
|
tasks.whenTaskAdded { theTask ->
|
|
if (theTask.name.equals("packageRelease")) {
|
|
theTask.dependsOn "askForPasswords"
|
|
}
|
|
}
|
|
|
|
// Create the wrapper
|
|
task wrapper(type: Wrapper) {
|
|
gradleVersion = '2.2.1'
|
|
}
|