This file contains hidden or 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
# Rename the plugin interface versions from .txt to .java | |
# In my SVN I store as .txt, but in Github I want them to be .java | |
$path = $env:SOURCEPATH + "\src\com\red_folder\phonegap\plugin\backgroundservice\*.txt" | |
Dir $path | rename-item -newname { $_.name -replace '\.txt$','.java' } |
This file contains hidden or 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
function filesDifferent($sourceFilename, $targetFilename) { | |
$targetFileExists = fileExists $targetFilename | |
if (!($targetFileExists)) { | |
return $TRUE | |
} | |
if ($sourceFilename.Contains(".jar")) { | |
removeFolder "c:\tmp\jartest\source" | |
removeFolder "c:\tmp\jartest\target" |
This file contains hidden or 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
pluginpath = "c:\\tmp\\backgroundserviceplugin\\plugin" | |
sourcepath = "c:\\tmp\\backgroundserviceplugin\\source" | |
build("BackgroundServicePlugin Build", PLUGINVERSION: "2.2.0", CORDOVAVERSION: "2.2.0", BUILDOUTPUTPATH: pluginpath, SOURCEPATH: sourcepath) | |
build("BackgroundServicePlugin Build", PLUGINVERSION: "2.3.0", CORDOVAVERSION: "2.3.0", BUILDOUTPUTPATH: pluginpath, SOURCEPATH: sourcepath) | |
build("BackgroundServicePlugin Build", PLUGINVERSION: "2.4.0", CORDOVAVERSION: "2.4.0", BUILDOUTPUTPATH: pluginpath, SOURCEPATH: sourcepath) | |
build("BackgroundServicePlugin Build", PLUGINVERSION: "2.5.0", CORDOVAVERSION: "2.5.0", BUILDOUTPUTPATH: pluginpath, SOURCEPATH: sourcepath) | |
build("BackgroundServicePlugin Build", PLUGINVERSION: "2.6.0", CORDOVAVERSION: "2.6.0", BUILDOUTPUTPATH: pluginpath, SOURCEPATH: sourcepath) | |
build("BackgroundServicePlugin Build", PLUGINVERSION: "2.7.0", CORDOVAVERSION: "2.7.0", BUILDOUTPUTPATH: pluginpath, SOURCEPATH: sourcepath) | |
build("BackgroundServicePlugin Build", PLUGINVERSION: "2.8.0", CO |
This file contains hidden or 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
Write-Host "Checking if this is version specific config.xml" | |
$versionSpecificConfig = $env:workspace + "\res\xml\" + $env:pluginversion + "\config.xml" | |
if ((Test-Path $versionSpecificConfig -PathType Leaf)) { | |
Write-Host "Version specific config found: " + $versionSpecificConfig | |
Remove-Item ($env:workspace + "\res\xml\config.xml") | |
Copy-Item ($versionSpecificConfig) -Destination ($env:workspace + "\res\xml\") | |
} else { | |
Write-Host "No specific config.xml version. Will use standard." | |
} |
This file contains hidden or 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
$classpathfile = ".classpath" | |
$pluginversion = (get-item env:"PLUGINVERSION").Value | |
$cordovaversion = (get-item env:"CORDOVAVERSION").Value | |
$pluginlibrarypath = "libs/backgroundserviceplugin-" + $pluginversion + ".jar" | |
$cordovalibrarypath = "libs/cordova-" + $cordovaversion + ".jar" | |
Write-Host("Plugin Version: {0}" -f $pluginversion) | |
Write-Host("Cordova Version: {0}" -f $cordovaversion) | |
Write-Host("Library Path: {0}" -f $librarypath) |
This file contains hidden or 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
mkdir "%SOURCEPATH%\src" | |
xcopy "%WORKSPACE%\src\*.*" "%SOURCEPATH%\src" /S /R /Y | |
mkdir "%SOURCEPATH%\aidl" | |
xcopy "%WORKSPACE%\aidl\*.*" "%SOURCEPATH%\aidl" /S /R /Y | |
xcopy "%WORKSPACE%\aidl\*.*" "%WORKSPACE%\src\" /S /R /Y | |
rmdir /S /Q "%WORKSPACE%\aidl" |
This file contains hidden or 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
mkdir "%BUILDOUTPUTPATH%\%PLUGINVERSION%" | |
copy /b "%BUILDOUTPUTPATH%\backgroundserviceplugin-%PLUGINVERSION%.jar" "%BUILDOUTPUTPATH%\%PLUGINVERSION%" | |
copy /b "%workspace%\assets\www\%PLUGINVERSION%\backgroundService*.js" "%BUILDOUTPUTPATH%\%PLUGINVERSION%" | |
copy /b "%workspace%\assets\www\%PLUGINVERSION%\myService*.js" "%BUILDOUTPUTPATH%\%PLUGINVERSION%" | |
copy /b "%workspace%\assets\www\%PLUGINVERSION%\index*.html" "%BUILDOUTPUTPATH%\%PLUGINVERSION%" |
This file contains hidden or 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
Write-Output "Checking if the app has finished" | |
$resultCode = 0 | |
& adb shell ps 2>&1 | % {if($_.contains("com.red_folder.phonegap.plugin.backgroundservice.sample")) { Write-Output "App is still running"; $resultCode = -1 } } | |
exit $resultCode |
This file contains hidden or 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
adb shell pm uninstall com.red_folder.phonegap.plugin.backgroundservice.sample |
This file contains hidden or 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
C:\CSharpWorkspace\JasmineReceiver\JasmineReceiver\bin\Debug\JasmineReceiver.exe |