Replaced grunt with gradle

This commit is contained in:
Hristo Hristov
2015-12-16 15:30:19 +02:00
parent 48310a31b8
commit 275b4306cd
8 changed files with 39 additions and 54 deletions

View File

@@ -1,3 +1,5 @@
def isWinOs = System.properties['os.name'].toLowerCase().contains('windows')
apply plugin: 'com.android.library'
android {
@@ -23,3 +25,33 @@ dependencies {
testCompile 'junit:junit:4.12'
compile 'com.android.support:support-v4:+'
}
task cleanDistDir (type: Delete) {
delete "../dist/"
}
task copyAar << {
copy {
from "../package.json"
into "../dist"
}
copy {
from "build/outputs/aar/widgets-release.aar"
into "../dist/platforms/android/"
}
}
task packFramework (type: Exec) {
workingDir "../dist"
if(isWinOs) {
commandLine "cmd", "/c", "npm", "pack"
}
else {
commandLine "npm", "pack"
}
}
assembleRelease.dependsOn(cleanDistDir)
copyAar.dependsOn(assembleRelease)
packFramework.dependsOn(copyAar)