Skip to content

Instantly share code, notes, and snippets.

@Red-Folder
Created September 20, 2013 19:38
Show Gist options
  • Save Red-Folder/6642733 to your computer and use it in GitHub Desktop.
Save Red-Folder/6642733 to your computer and use it in GitHub Desktop.
$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)
$doc = [xml](Get-Content -Path $classpathfile)
foreach($classpathentry in $doc.classpath.ChildNodes)
{
if ($classpathentry.path.contains("cordova")) {
$classpathentry.path = $cordovalibrarypath
}
if ($classpathentry.path.contains("backgroundserviceplugin")) {
$classpathentry.path = $pluginlibrarypath
}
}
$doc.Save($classpathfile)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment