From c1f482a3821c9650704ebb7d31b0a6305aa952a0 Mon Sep 17 00:00:00 2001 From: Samuel Carlsson Date: Mon, 25 Jul 2016 08:55:05 +0200 Subject: [PATCH 1/5] Build: Specifying java source version in pom - This makes is easier to import pom into InteliJ. --- pom.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pom.xml b/pom.xml index e666eb8..0259a38 100644 --- a/pom.xml +++ b/pom.xml @@ -44,6 +44,13 @@ src test + + maven-compiler-plugin + + 1.7 + 1.7 + + org.apache.maven.plugins maven-source-plugin From 4beaa0e87b138c3e18249654f1f9f2b8aa47cea6 Mon Sep 17 00:00:00 2001 From: Samuel Carlsson Date: Mon, 25 Jul 2016 08:56:39 +0200 Subject: [PATCH 2/5] Build: Connecting pom.xml to IntelliJ --- .idea/compiler.xml | 13 +++++++++++-- .idea/encodings.xml | 1 + .idea/misc.xml | 9 ++++++++- jadb.iml | 14 ++++++++------ 4 files changed, 28 insertions(+), 9 deletions(-) diff --git a/.idea/compiler.xml b/.idea/compiler.xml index 217af47..f329bae 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -17,7 +17,16 @@ + + + + + + + + + + - - + \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml index f758959..8ffd759 100644 --- a/.idea/encodings.xml +++ b/.idea/encodings.xml @@ -1,6 +1,7 @@ + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index d0a656d..b6da4f3 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -3,7 +3,14 @@ - + + + + diff --git a/jadb.iml b/jadb.iml index 78ba235..c419de5 100644 --- a/jadb.iml +++ b/jadb.iml @@ -1,15 +1,17 @@ - - - - + + + + + + + - - + \ No newline at end of file From c478d9bb9de70f390d1cc636dcc975475946b394 Mon Sep 17 00:00:00 2001 From: Samuel Carlsson Date: Mon, 25 Jul 2016 08:58:07 +0200 Subject: [PATCH 3/5] Build: Removing Eclipse project files. --- .classpath | 8 -------- .project | 17 ----------------- 2 files changed, 25 deletions(-) delete mode 100644 .classpath delete mode 100644 .project diff --git a/.classpath b/.classpath deleted file mode 100644 index e72ef7c..0000000 --- a/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/.project b/.project deleted file mode 100644 index 9f5c71e..0000000 --- a/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - jadb - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - From 0eb27e79b9dcf976f66bfefeb0d568eac512327f Mon Sep 17 00:00:00 2001 From: Samuel Carlsson Date: Mon, 25 Jul 2016 09:04:31 +0200 Subject: [PATCH 4/5] Build: Cleaning up .gitignore & friends --- .gitattributes | 8 -- .gitignore | 209 ++++++------------------------------------------- 2 files changed, 23 insertions(+), 194 deletions(-) diff --git a/.gitattributes b/.gitattributes index 412eeda..c6439c8 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,14 +1,6 @@ # Auto detect text files and perform LF normalization * text=auto -# Custom for Visual Studio -*.cs diff=csharp -*.sln merge=union -*.csproj merge=union -*.vbproj merge=union -*.fsproj merge=union -*.dbproj merge=union - # Standard to msysgit *.doc diff=astextplain *.DOC diff=astextplain diff --git a/.gitignore b/.gitignore index ae4846e..6aa6197 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,23 @@ Generated by tests /xyz screenshot.png + +################ +# IntelliJ # +################ +/.idea/workspace.xml +/.idea/tasks.xml + + +############# +# Maven # +############# +.idea/workspace.xml +.idea/libraries +out/ +target/ + + ################# ## Eclipse ################# @@ -34,145 +51,9 @@ local.properties .buildpath -################# -## Visual Studio -################# - -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -# User-specific files -*.suo -*.user -*.sln.docstates - -# Build results - -[Dd]ebug/ -[Rr]elease/ -x64/ -build/ -[Bb]in/ -[Oo]bj/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -*_i.c -*_p.c -*.ilk -*.meta -*.obj -*.pch -*.pdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.log -*.scc - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opensdf -*.sdf -*.cachefile - -# Visual Studio profiler -*.psess -*.vsp -*.vspx - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# NCrunch -*.ncrunch* -.*crunch*.local.xml - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.Publish.xml -*.pubxml - -# NuGet Packages Directory -## TODO: If you have NuGet Package Restore enabled, uncomment the next line -#packages/ - -# Windows Azure Build Output -csx -*.build.csdef - -# Windows Store app package directory -AppPackages/ - -# Others -sql/ -*.Cache -ClientBin/ -[Ss]tyle[Cc]op.* -~$* -*~ -*.dbmdl -*.[Pp]ublish.xml -*.pfx -*.publishsettings - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file to a newer -# Visual Studio version. Backup files are not needed, because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm - -# SQL Server files -App_Data/*.mdf -App_Data/*.ldf - -############# -## Windows detritus -############# +##################### +## Windows detritus # +##################### # Windows image file caches Thumbs.db @@ -184,51 +65,7 @@ Desktop.ini # Recycle Bin used on file shares $RECYCLE.BIN/ -# Mac crap +################# +## Mac detritus # +################# .DS_Store - - -############# -## Python -############# - -*.py[co] - -# Packages -*.egg -*.egg-info -dist/ -build/ -eggs/ -parts/ -var/ -sdist/ -develop-eggs/ -.installed.cfg - -# Installer logs -pip-log.txt - -# Unit test / coverage reports -.coverage -.tox - -#Translations -*.mo - -#Mr Developer -.mr.developer.cfg - - -############# -# Maven # -############# -.idea/workspace.xml -.idea/libraries -out/ - - -############# -# Maven # -############# -target/ From be4fa2279c0342fd4958fe2479925167e5e43ccc Mon Sep 17 00:00:00 2001 From: Samuel Carlsson Date: Mon, 25 Jul 2016 18:51:24 +0200 Subject: [PATCH 5/5] Refactor: Putting test output in `out/` directory. To avoid cluttering the repo root. --- .gitignore | 6 ------ test/se/vidstige/jadb/test/RealDeviceTestCases.java | 8 ++++---- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 6aa6197..e37b44d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,3 @@ -Generated by tests -/foobar.md -/xyz -screenshot.png - - ################ # IntelliJ # ################ diff --git a/test/se/vidstige/jadb/test/RealDeviceTestCases.java b/test/se/vidstige/jadb/test/RealDeviceTestCases.java index 64687a7..afd3b36 100644 --- a/test/se/vidstige/jadb/test/RealDeviceTestCases.java +++ b/test/se/vidstige/jadb/test/RealDeviceTestCases.java @@ -76,15 +76,15 @@ public class RealDeviceTestCases { @Test public void testPullFile() throws Exception { JadbDevice any = jadb.getAnyDevice(); - any.pull(new RemoteFile("/sdcard/README.md"), new File("foobar.md")); + any.pull(new RemoteFile("/sdcard/README.md"), new File("out/foobar.md")); //second read on the same device - any.pull(new RemoteFile("/sdcard/README.md"), new File("foobar.md")); + any.pull(new RemoteFile("/sdcard/README.md"), new File("out/foobar.md")); } @Test(expected = JadbException.class) public void testPullInvalidFile() throws Exception { JadbDevice any = jadb.getAnyDevice(); - any.pull(new RemoteFile("/file/does/not/exist"), new File("xyz")); + any.pull(new RemoteFile("/file/does/not/exist"), new File("out/xyz")); } @Test @@ -99,7 +99,7 @@ public class RealDeviceTestCases { JadbDevice any = jadb.getAnyDevice(); FileOutputStream outputStream = null; try { - outputStream = new FileOutputStream(new File("screenshot.png")); + outputStream = new FileOutputStream(new File("out/screenshot.png")); InputStream stdout = any.executeShell("screencap", "-p"); Stream.copy(stdout, outputStream); } finally {