Skip to content

Commit

Permalink
exclude jars but include scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
omercs committed May 19, 2014
1 parent 4067abf commit fbf479c
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,18 @@
# Java class files
*.class

# Jar files
*.jar

# Mac files
.DS_Store

# generated files
bin/
gen/
libs/
target/
Support/

# exclude
!libs/getLibs.*
!libs/required-libs.txt
# Local configuration file (sdk path, etc)
local.properties
integration_tests.properties
Expand Down
22 changes: 22 additions & 0 deletions src/libs/getLibs.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
$client = new-object System.Net.WebClient
$shell_app = new-object -com shell.application
$scriptpath = $MyInvocation.MyCommand.Path
$dir = Split-Path $scriptpath
$filename = "google-gson-2.2.2-release.zip"

Write-Host "Downloading Google Gson 2.2.2"
$client.DownloadFile("http://google-gson.googlecode.com/files/google-gson-2.2.2-release.zip", "$dir\$filename")

Write-Host "Decompressing..."
$zip_file = $shell_app.namespace("$dir\$filename")
$destination = $shell_app.namespace("$dir")
$destination.Copyhere($zip_file.items())

Write-Host "Removing zip file"
Remove-Item "$dir\$filename"

Write-Host "Move library to current folder"
Move-Item "$dir\google-gson-2.2.2\gson-2.2.2.jar" "$dir"

Write-Host "Remove extra files"
Remove-Item "$dir\google-gson-2.2.2\" -recurse
16 changes: 16 additions & 0 deletions src/libs/getLibs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#! /bin/sh

echo "Downloading Google Gson 2.2.2"
curl -O http://google-gson.googlecode.com/files/google-gson-2.2.2-release.zip

echo "Decompressing..."
unzip google-gson-2.2.2-release.zip

echo "Remove zip"
rm google-gson-2.2.2-release.zip

echo "Move library"
mv ./google-gson-2.2.2/gson-2.2.2.jar ./

echo "Remove extra files"
rm -rf ./google-gson-2.2.2
3 changes: 3 additions & 0 deletions src/libs/required-libs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This directory should contain the following JARs:
- gson-2.2.2.jar
- support-v4.jar (Android support jar that you can include from eclipse)

0 comments on commit fbf479c

Please sign in to comment.