diff --git a/.gitignore b/.gitignore index 4d6556ce..b57e6255 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,8 @@ -*.class - -# Package Files # -*.jar -*.war -*.ear -/bin +bin +build +.gradle +.settings +.classpath +.project +.metadata +*.bak diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 9ccc4bcc..00000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "core"] - path = core - url = http://github.com/vwiencek/syncany.git diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..e99a7aea --- /dev/null +++ b/.travis.yml @@ -0,0 +1,30 @@ +language: java +jdk: openjdk7 + +env: + global: + - TERM=dumb + - secure: "DU5sznUhdYMK2h974ihHnuKsQVORwfSRHQHd3IBM+IwUBh2dzb3eOCJYWowekNp0LxBND2YSCti8EjD/9Zo/9W/Km9aV5zDRFnctzLQX4cYcssqtt0bUrXkgzIW7A8ou6vRcVdjp4Zp/jfGAJxC7TWCIoxell0Id49yLNMcBYns=" + - secure: "XWkv3pk/hEJB7BDudPH3x9zk541Bl1yb5PynDRkMSUrKeeU2E0hFX1qATvy+gwadIFoqqlDDemtKjURBJq5nyTuWVJZ0StkH3PMdSjjMymzzBmf1RsB+EmpemG/wldXLys5S/jtlsZ/cQuqC/R4hgyTLr86YM/KdsfPBu0lsyM0=" + - secure: "mNC9zY3ztFoVIIyhOU2i6FUGkV81YSiKxYuderHN9ScuACYngE2F+ggp5ZphEoRqQqkn/YaqymMwrOUtbGK0JT8C29E3fJIiW+zryV/OJdu/ed5/yfkwTHQGYp9kdlP6MlERSstG3z04CT44GcuW0BqA6ySsgJvnlBYMzz211yw=" + +branches: + only: + - master + - develop + +notifications: + email: false + irc: chat.freenode.net#syncany + +before_install: +- sudo apt-get update +- sudo apt-get install -y -q lftp +- lftp -v + +script: +- core/gradlew clean pluginJar + +after_success: +- core/gradle/lftp/lftpuploadplugin.sh + diff --git a/README.md b/README.md index 62eb0945..b8bf4046 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,6 @@ Syncany SFTP Plugin +------------------- +This plugin uses an **SFTP folder** as a storage backend for [Syncany](http://www.syncany.org). The plugin can be installed in Syncany using the `sy plugin install` command. For further information about the usage, please refer to the central **[wiki page](https://github.com/binwiederhier/syncany/wiki)**. -#1 Steps to make it work - - git clone http://github.com/vwiencek/syncany-plugin-sftp.git - cd syncany-plugin-hazelcast - git submodule init - git submodule update - gradle eclipse - -Then you have a fully 'eclipse-prepared' environment to start improving the plugin +For plugin development, please refer to the [plugin development wiki page](https://github.com/binwiederhier/syncany/wiki/Plugin-development). diff --git a/build.gradle b/build.gradle index 63a44a9e..57163060 100644 --- a/build.gradle +++ b/build.gradle @@ -1,16 +1,65 @@ +evaluationDependsOn(':syncany') + apply plugin: 'java' apply plugin: 'eclipse' +configurations { + pluginjar +} + +project.ext { + pluginId = "sftp" + pluginName = "SFTP" + pluginVersion = "0.1.0-alpha" + pluginDate = new Date() + pluginAppMinVersion = "0.1.2-alpha" + pluginRelease = project(':syncany').ext.applicationRelease + + pluginVersionSnapshot = project(':syncany').ext.applicationVersionSnapshot + pluginVersionFull = "${pluginVersion}${pluginVersionSnapshot}" +} + dependencies { compile project(':syncany-lib') compile "com.jcraft:jsch:0.1.50" compile "org.apache.sshd:sshd-core:0.9.0" compile "org.apache.commons:commons-vfs2:2.0" - + + pluginjar "com.jcraft:jsch:0.1.50" + pluginjar "org.apache.sshd:sshd-core:0.9.0" + pluginjar "org.apache.commons:commons-vfs2:2.0" + testCompile "junit:junit:4.3" - testCompile project(path : ':syncany-lib', configuration: 'tests') + testCompile project(path: ':syncany-lib', configuration: 'tests') } repositories { mavenCentral() } + +processResources { + filter{ String line -> line.replaceAll('%pluginId%', "${pluginId}") } + filter{ String line -> line.replaceAll('%pluginName%', "${pluginName}") } + filter{ String line -> line.replaceAll('%pluginVersion%', "${pluginVersionFull}") } + filter{ String line -> line.replaceAll('%pluginDate%', "${pluginDate}") } + filter{ String line -> line.replaceAll('%pluginAppMinVersion%', "${pluginAppMinVersion}") } + filter{ String line -> line.replaceAll('%pluginRelease%', "${pluginRelease}") } +} + +task pluginJar(type: Jar, dependsOn: [processResources, compileJava]) { + from files(sourceSets.main.output.classesDir) + from files(sourceSets.main.output.resourcesDir) + from { configurations.pluginjar.collect { zipTree(it) } } + + baseName = "syncany-plugin-${pluginId}" + version = "${pluginVersionFull}" + + manifest { + attributes("Plugin-Id": "${pluginId}") + attributes("Plugin-Name": "${pluginName}") + attributes("Plugin-Version": "${pluginVersionFull}") + attributes("Plugin-Date": "${pluginDate}") + attributes("Plugin-App-Min-Version": "${pluginAppMinVersion}") + attributes("Plugin-Release": "${pluginRelease}") + } +} diff --git a/core b/core deleted file mode 160000 index 02402358..00000000 --- a/core +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 02402358f6381c44a20b3e53ff2cf193e030fc83 diff --git a/core/.gitignore b/core/.gitignore new file mode 100644 index 00000000..41d5195f --- /dev/null +++ b/core/.gitignore @@ -0,0 +1,11 @@ +bin +build +.gradle +.settings +.classpath +.project +.metadata +*.bak +gradle/arch/syncany/pkg +gradle/arch/syncany/src +gradle/arch/syncany/syncany*.tar* diff --git a/core/.travis.yml b/core/.travis.yml new file mode 100644 index 00000000..e96d85e2 --- /dev/null +++ b/core/.travis.yml @@ -0,0 +1,67 @@ +language: java +jdk: openjdk7 + +env: + global: + # Terminal does not support colors (Gradle display issue) + - TERM=dumb + + # Syncany FTP credentials (SYNCANY_FTP_* environment variables) + - secure: "OWv7tJZiDQYxZpxw25Qs4B086veBPzjGvrVApfd8tAAOI7xG8Ifp9+TFsRO27xw99ZDFDLzjSZyffR45sgGCTuRapdSWNwIEmma4dAn299bFl1ayU5IXQYtIRsaXjyAm8QPmLbdl5YHFE77ArzFIsaysb7ZXB3cKnYfJGkiNLFs=" + - secure: "I0+Aw5CgV5wGfsW8hO/HB9FgCUQI/UDg1ppUV7ATq6UpaxmftSpycxR5TOx3D1ISewoD079BqLxSB1i4grns5vKccGxgjeGt4vFr3X1c1NHth0jOPVMJDEVcKZ4odxM8BbSa4MOk+ZpqsgjfDqGZzxt8eRBai1chlKx8WEKao+4=" + - secure: "JPLqhdDfP3y12dlCtyNfNg32vEQzJAKAp9CFrvz1uogZr61bp0NEi3cDS2TGSqWep7X/uPgJ84LFI22Fy5zH/1pJxY9Y9NpmVnRtFy9Cp3Qb0A9fUZ2ePO2TtyHBwLHCDO9FolrhPpqX6WuCSW26igIEzyAwaslFAJUhF09qadw=" + +branches: + only: + - master + - develop + +notifications: + email: false + irc: "chat.freenode.net#syncany" + +before_install: + # Update APT (necessary!) + - sudo apt-get update + + # FPM setup (Ruby-based) + - sudo rm /etc/profile.d/rvm.sh + - sudo apt-get install -y -q ruby ruby-dev build-essential rubygems ruby-rvm + - rvmsudo gem install fpm + - fpm --help | grep "This is fpm" + + # LFTP (to upload the distributables and JavaDoc) + - sudo apt-get install -y -q lftp graphviz wine python-software-properties + - lftp -v + + # Graphviz (for JavaDoc images; see Gradle tasks) + - sudo apt-get install -y -q graphviz + + # Inno Setup (for Windows executable/installer) + - sudo add-apt-repository --yes ppa:arx/release + - sudo apt-get update -d + - sudo apt-get install -y -q innoextract wine python-software-properties + - wine --version + - innoextract --version + - ./gradle/innosetup/innoinstall.sh + - sudo cp gradle/innosetup/iscc /usr/local/bin/iscc + - iscc /? 2> /dev/null | grep "Inno Setup Preprocessor" + + # Line of code tool (cloc) + - sudo apt-get install -y -q cloc + - cloc --version + +script: + # Run JUnit tests and generate reports + - ./gradlew testGlobal coberturaReport performCoverageCheck + +after_success: + # Create distributables and JavaDoc + - ./gradlew installApp distTar distZip debian exe javadocAll + + # Line of code stats + - cloc --quiet --xml --out=build/reports/cloc.xml $(find -type d -name main | grep src/main) + + # Upload distributables and JavaDoc + - ./gradle/lftp/lftpupload.sh + diff --git a/core/AUTHORS.md b/core/AUTHORS.md new file mode 100644 index 00000000..2622cf97 --- /dev/null +++ b/core/AUTHORS.md @@ -0,0 +1,11 @@ +Authors +======= + +Point of Contact and Lead Development: +- Philipp C. Heckel (philipp.heckel@gmail.com) + +Team / Contributors: +- Fabrice Rossi (fabrice.rossi@apiacoa.org) +- Steffen Dangmann (steffen.dangmann@googlemail.com) +- Pim Otte (otte.pim@gmail.com) +- Vincent Wiencek (vwiencek@gmail.com) diff --git a/core/CHANGELOG.md b/core/CHANGELOG.md new file mode 100644 index 00000000..ac798334 --- /dev/null +++ b/core/CHANGELOG.md @@ -0,0 +1,54 @@ +Change Log +========== + +### Release 0.1.2-alpha (Date: tbd.) + +- Developer/alpha release (**NOT FOR PRODUCTION USE!**) +- Features: + + Extracted non-core plugins, allow easy plugin installation through + `sy plugin (list|install|remove)` #26/#104 + - Shipped plugins now only 'local' + - Installable plugins: + [FTP](https://github.com/syncany/syncany-plugin-ftp), + [SFTP](https://github.com/syncany/syncany-plugin-sftp) (no host checking), + [WebDAV](https://github.com/syncany/syncany-plugin-webdav) (HTTP only), + [Amazon S3](https://github.com/syncany/syncany-plugin-s3) + + Ignore files using wildcards in .syignore (e.g. *.bak, *.r??) #108 + + Added Arch Linux 'syncany-git' package #99 + + Allow speicifying HTTP(S)/WebDAV proxy and other global system properties #109 +- Bugfixes + + Fix semantic in TransferManager `test()` (incl. all plugins) #103/#102 + + WebDAV plugin fix to create "multichunks"/"databases" folder #110 + + Fix "Plugin not supported" stack trace #111 + + Windows build script fix for "Could not normalize path" #107 + + Fix database file name leak of username and hostname #114 + + Check plugin compatibility before installing (check appMinVersion) #104 + + Don't ignore local/remote notifications if sync already running #88 + + Uninstall plugins on Windows (JAR locked) #113/#117 + + Rotate logs to max. 4x25 MB #116 + + Fix multichunk resource close issue #118/#120 + +### Release 0.1.1-alpha (Date: 14 Apr 2014) + +- Developer/alpha release (**NOT FOR PRODUCTION USE!**) +- Features: + + Ignoring files using .syignore file #66/#77 + + Arch Linux package support; release version #80 and git version #99 + + Additional command-specific --help texts +- Windows-specific: + + Add Syncany binaries to PATH environment variable during setup #84/#91 + + Fixed HSQLDB-path issue #98 +- Bugfixes: + + Timezone fix in tests #78/#90 + + Reference issue "Cannot determine file content for checksum" #92/#94 + + Atomic 'init' command (rollback on failure) #95/#96 +- Other things: + + Tests for 'connect' command + + Tests for .syignore + +### Release 0.1.0-alpha (Date: 30 March 2014) + +- First developer/alpha release (**NOT FOR PRODUCTION USE!**) +- Command line interface (CLI) with commands + + init: initialize local folder and remote repository + + connect diff --git a/core/LICENSE.md b/core/LICENSE.md new file mode 100644 index 00000000..e242efc3 --- /dev/null +++ b/core/LICENSE.md @@ -0,0 +1,275 @@ +GNU General Public License +========================== + +### Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +59 Temple Place, Suite 330 +Boston, MA 02111-1307 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + + +### Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to most +of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you can +do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for a +fee, you must give the recipients all the rights that you have. You must make +sure that they, too, receive or can get the source code. And you must show them +these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) offer +you this license which gives you legal permission to copy, distribute and/or +modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced by +others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We wish +to avoid the danger that redistributors of a free program will individually +obtain patent licenses, in effect making the program proprietary. To prevent +this, we have made it clear that any patent must be licensed for everyone's free +use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + + +### Terms And Conditions For Copying, Distribution And Modification + +0. This License applies to any program or other work which contains a notice + placed by the copyright holder saying it may be distributed under the terms + of this General Public License. The "Program", below, refers to any such + program or work, and a "work based on the Program" means either the Program + or any derivative work under copyright law: that is to say, a work + containing the Program or a portion of it, either verbatim or with + modifications and/or translated into another language. (Hereinafter, + translation is included without limitation in the term "modification".) + Each licensee is addressed as "you". + + Activities other than copying, distribution and modification are not + covered by this License; they are outside its scope. The act of running the + Program is not restricted, and the output from the Program is covered only + if its contents constitute a work based on the Program (independent of + having been made by running the Program). Whether that is true depends on + what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as + you receive it, in any medium, provided that you conspicuously and + appropriately publish on each copy an appropriate copyright notice and + disclaimer of warranty; keep intact all the notices that refer to this + License and to the absence of any warranty; and give any other recipients + of the Program a copy of this License along with the Program. + + You may charge a fee for the physical act of transferring a copy, and you + may at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, + thus forming a work based on the Program, and copy and distribute such + modifications or work under the terms of Section 1 above, provided that you + also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole + or in part contains or is derived from the Program or any part thereof, + to be licensed as a whole at no charge to all third parties under the + terms of this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may + redistribute the program under these conditions, and telling the user + how to view a copy of this License. (Exception: if the Program itself + is interactive but does not normally print such an announcement, your + work based on the Program is not required to print an announcement.) + + These requirements apply to the modified work as a whole. If identifiable + sections of that work are not derived from the Program, and can be + reasonably considered independent and separate works in themselves, then + this License, and its terms, do not apply to those sections when you + distribute them as separate works. But when you distribute the same + sections as part of a whole which is a work based on the Program, the + distribution of the whole must be on the terms of this License, whose + permissions for other licensees extend to the entire whole, and thus to + each and every part regardless of who wrote it. + + Thus, it is not the intent of this section to claim rights or contest your + rights to work written entirely by you; rather, the intent is to exercise + the right to control the distribution of derivative or collective works + based on the Program. + + In addition, mere aggregation of another work not based on the Program with + the Program (or with a work based on the Program) on a volume of a storage + or distribution medium does not bring the other work under the scope of + this License. + +3. You may copy and distribute the Program (or a work based on it, under + Section 2) in object code or executable form under the terms of Sections 1 + and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 + above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of + Sections 1 and 2 above on a medium customarily used for software + interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + + The source code for a work means the preferred form of the work for making + modifications to it. For an executable work, complete source code means all + the source code for all modules it contains, plus any associated interface + definition files, plus the scripts used to control compilation and + installation of the executable. However, as a special exception, the source + code distributed need not include anything that is normally distributed (in + either source or binary form) with the major components (compiler, kernel, + and so on) of the operating system on which the executable runs, unless + that component itself accompanies the executable. + + If distribution of executable or object code is made by offering access to + copy from a designated place, then offering equivalent access to copy the + source code from the same place counts as distribution of the source code, + even though third parties are not compelled to copy the source along with + the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as + expressly provided under this License. Any attempt otherwise to copy, + modify, sublicense or distribute the Program is void, and will + automatically terminate your rights under this License. However, parties + who have received copies, or rights, from you under this License will not + have their licenses terminated so long as such parties remain in full + compliance. + +5. You are not required to accept this License, since you have not signed it. + However, nothing else grants you permission to modify or distribute the + Program or its derivative works. These actions are prohibited by law if you + do not accept this License. Therefore, by modifying or distributing the + Program (or any work based on the Program), you indicate your acceptance of + this License to do so, and all its terms and conditions for copying, + distributing or modifying the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), + the recipient automatically receives a license from the original licensor + to copy, distribute or modify the Program subject to these terms and + conditions. You may not impose any further restrictions on the recipients' + exercise of the rights granted herein. You are not responsible for + enforcing compliance by third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent + infringement or for any other reason (not limited to patent issues), + conditions are imposed on you (whether by court order, agreement or + otherwise) that contradict the conditions of this License, they do not + excuse you from the conditions of this License. If you cannot distribute so + as to satisfy simultaneously your obligations under this License and any + other pertinent obligations, then as a consequence you may not distribute + the Program at all. For example, if a patent license would not permit + royalty-free redistribution of the Program by all those who receive copies + directly or indirectly through you, then the only way you could satisfy + both it and this License would be to refrain entirely from distribution of + the Program. + + If any portion of this section is held invalid or unenforceable under any + particular circumstance, the balance of the section is intended to apply + and the section as a whole is intended to apply in other circumstances. + + It is not the purpose of this section to induce you to infringe any patents + or other property right claims or to contest validity of any such claims; + this section has the sole purpose of protecting the integrity of the free + software distribution system, which is implemented by public license + practices. Many people have made generous contributions to the wide range + of software distributed through that system in reliance on consistent + application of that system; it is up to the author/donor to decide if he or + she is willing to distribute software through any other system and a + licensee cannot impose that choice. + + This section is intended to make thoroughly clear what is believed to be a + consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain + countries either by patents or by copyrighted interfaces, the original + copyright holder who places the Program under this License may add an + explicit geographical distribution limitation excluding those countries, so + that distribution is permitted only in or among countries not thus excluded. + In such case, this License incorporates the limitation as if written in + the body of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the + General Public License from time to time. Such new versions will be similar + in spirit to the present version, but may differ in detail to address new + problems or concerns. + + Each version is given a distinguishing version number. If the Program + specifies a version number of this License which applies to it and "any + later version", you have the option of following the terms and conditions + either of that version or of any later version published by the Free + Software Foundation. If the Program does not specify a version number of + this License, you may choose any version ever published by the Free + Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs + whose distribution conditions are different, write to the author to ask for + permission. For software which is copyrighted by the Free Software + Foundation, write to the Free Software Foundation; we sometimes make + exceptions for this. Our decision will be guided by the two goals of + preserving the free status of all derivatives of our free software and of + promoting the sharing and reuse of software generally. + + +### No Warranty + + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR + THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN + OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES + PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED + OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO + THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM + PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR + CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL + ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE + THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY + GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE + USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF + DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD + PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), + EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF + SUCH DAMAGES. diff --git a/core/README.md b/core/README.md new file mode 100644 index 00000000..ff374b92 --- /dev/null +++ b/core/README.md @@ -0,0 +1,130 @@ +Syncany [![Build Status](https://travis-ci.org/binwiederhier/syncany.png?branch=master)](https://travis-ci.org/binwiederhier/syncany) [![Coverage Status](https://api.syncany.org/badge/coverage.php)](https://syncany.org/reports/coverage/) [![Test Status](https://api.syncany.org/badge/tests.php)](https://syncany.org/reports/tests/) [![Lines of Code](https://api.syncany.org/badge/lines.php)](https://syncany.org/reports/cloc.xml) +======= +> **Important:** Please be aware that this is still **ALPHA code**! Do not use it + for important files. + +Syncany is an open-source cloud storage and filesharing application. It allows +users to backup and share certain folders of their workstations using any kind +of storage, e.g. FTP, SFTP, WebDAV and Amazon S3. + +While the basic idea is similar to Dropbox, Syncany is +open-source and additionally provides data encryption and more flexibility in +terms of storage type and provider: + +- **Data encryption**: Syncany encrypts the files locally, so that any online + storage can be used even for sensitive data. +- **Any storage**: Syncany uses a plug-in based storage system. It can + be used with any type of remote storage. + + +**Directly jump to ...** + +- [Download and install Syncany](#download-and-install-syncany) +- [Sample usage: Try Syncany](#sample-usage-try-syncany) +- [Build and development instructions](#build-and-development-instructions) +- [Buy us a coffee](#buy-us-a-coffee) +- [Licensing, website and contact](#licensing-website-and-contact) + + +Download and install Syncany +---------------------------- +You can download the current binary packages and installers from the [releases page](https://github.com/binwiederhier/syncany/releases), or from the Syncany [download site](http://syncany.org/dist/). **Please be aware that this is still ALPHA code! Do not use it for important files.** + +**Latest release:** +Syncany 0.1.2-alpha, 27 April 2014, [[tar.gz]](https://syncany.org/dist/releases/syncany-0.1.2-alpha.tar.gz) [[zip]](https://syncany.org/dist/releases/syncany-0.1.2-alpha.zip) [[deb]](https://syncany.org/dist/releases/syncany_0.1.2-alpha_all.deb) [[exe]](https://syncany.org/dist/releases/syncany-0.1.2-alpha.exe) + +Quick [install and usage instructions](https://github.com/binwiederhier/syncany/wiki/CLI-quick-howto) can be found in the wiki. +If you like it a bit more detailed, [there's lots more you can explore](https://github.com/binwiederhier/syncany/wiki). + + +Sample usage: Try Syncany +------------------------- + +Usage is pretty similar to a version control system. If you have used Git or +SVN, it should feel a lot alike. + +**1. Choose and install a storage plugin** +First choose the storage backend you'd like to use by doing `sy plugin list` and then `sy plugin install`. As of today, we've implemented plugins for [FTP](https://github.com/syncany/syncany-plugin-ftp), [SFTP](https://github.com/syncany/syncany-plugin-sftp), [WebDAV](https://github.com/syncany/syncany-plugin-webdav) and [Amazon S3](https://github.com/syncany/syncany-plugin-s3). For this example, we'll install the FTP plugin: +``` +$ sy plugin install ftp +``` + +**2. Initialize a local directory** + +``` +$ sy init +Choose a storage plugin. Available plugins are: ftp, local, webdav, s3, sftp +Plugin: ftp + +Connection details for FTP connection: +- Hostname: example.com +- Username: ftpuser +- Password (not displayed): +- Path: repo-folder +- Port (optional, default is 21): + +Password (min. 10 chars): (user enters repo password) +Confirm: (user repeats repo password) + +Repository created, and local folder initialized. To share the same repository +with others, you can share this link: syncany://storage/1/csbxyS6AA+bSK7OxbOxYQXyeouMeoU... +``` + +This sets up a new repository on the given remote storage and initializes the +local folder. You can now use `sy connect` to connect to this repository +from other clients. + +**3. Add files and synchronize** + +To let Syncany do everything automatically, simple use the `sy watch` command. +This command will synchronize your local files. + +``` +$ sy watch +``` + +You can also manually trigger the upload of your local files or the download of remote changes: + +``` +$ sy up +$ sy down +``` + +**4. Connect other clients** +To connect new clients to an existing repository, use the `sy connect` command. +This will set up your local folder to sync with the chosen remote repository. + +``` +$ sy connect syncany://storage/1/csbxyS6AA+bSK7OxbOxYQXyeouMeoU... + +Password: (user enters repo password) + +Repository connected, and local folder initialized. +You can now use the 'syncany' command to sync your files. +``` + +For a detailed demo, please refer to a [screencast](https://github.com/binwiederhier/syncany/wiki/Documentation). + + +Build and development instructions +---------------------------------- +Excited? Want to help? Or just build it yourself? For information about building, development, documentation, screencasts, diagrams and contributions, please check out **[the Syncany wiki page](https://github.com/binwiederhier/syncany/wiki)**. It'll hopefully give you all the information you need! + + +Buy us a coffee +--------------- +If you like what you see and you want to support us, you can buy us a coffee or a beer. There are maaanny ways to do so. + +Break some hashes for us and [donate some Bitcoins](https://blockchain.info/address/1626wjrw3uWk9adyjCfYwafw4sQWujyjn8); or be a charmer and [flattr us](https://flattr.com/thing/290043/Syncany). If that's not for you, why not give us some change [with PayPal](http://www.syncany.org/donate.html)? Any contributions are much appreciated! + + +Licensing, website and contact +------------------------------ + +Syncany is licensed under the GPLv2 open source license. It is actively developed by [Philipp C. Heckel](http://blog.philippheckel.com/) and [many others](https://github.com/binwiederhier/syncany/graphs/contributors). We are always looking for people to join or help out. Feel free to contact us: + +- [Syncany website](https://www.syncany.org/), still with screenshots of the old interface +- [Syncany wiki page](https://github.com/binwiederhier/syncany/wiki), **most important resource, and always updated** +- [Mailing list](https://launchpad.net/~syncany-team), still on Launchpad (**active!**) +- [IRC channel #syncany on Freenode](https://webchat.freenode.net/?channels=syncany) (my nick is *binwiederhier*) +- [@syncany on Twitter](https://twitter.com/#!/syncany), somewhat quiet there, though ... diff --git a/core/build.gradle b/core/build.gradle new file mode 100644 index 00000000..8607f13c --- /dev/null +++ b/core/build.gradle @@ -0,0 +1,301 @@ +// +// Build script for main project +// + +// Global Helpers ////////////////////////////////////////////////////////////// + +String execAndGetOutput(String command) { + try { + def stdout = new ByteArrayOutputStream() + + exec { + workingDir rootProject.projectDir + commandLine command.split() + standardOutput = stdout + } + + return stdout.toString().trim() + } + catch (Exception e) { + return null + } +} + +String getRevision() { + String currentCommit = execAndGetOutput("git rev-parse --short HEAD") + return (currentCommit != null) ? currentCommit : "UNKNOWN" +} + +boolean isApplicationRelease() { + // Note: This must work for detached commits (git checkout -qf ) + + String currentBranches = execAndGetOutput("git log -n 1 --pretty=%d HEAD") + return currentBranches.contains("origin/master") +} + + +// Global Settings ///////////////////////////////////////////////////////////// + +project.ext { + applicationVersion = "0.1.2-alpha" + + applicationRelease = isApplicationRelease() + applicationDate = new Date() + applicationRevision = getRevision() + + applicationVersionSnapshot = (!applicationRelease) ? "+SNAPSHOT.${applicationDate.format('yyMMddHHmm')}.git${applicationRevision}" : "" + applicationVersionFull = "${applicationVersion}${applicationVersionSnapshot}" +} + +repositories { + mavenCentral() +} + +// Coverage (Cobertura) //////////////////////////////////////////////////////// +// Run as: gradle testGlobal coberturaReport performCoverageCheck + +apply plugin: 'cobertura' + +buildscript { + repositories { + mavenCentral() + } + + dependencies { + classpath 'net.saliman:gradle-cobertura-plugin:2.2.2' + } +} + +cobertura { + coverageFormats = ['html', 'xml'] + coverageReportDatafile = file("build/cobertura/cobertura.ser") + coverageReportDir = file("build/reports/coverage") + + coverageDirs = [] + coverageSourceDirs = [] + coverageMergeDatafiles = [] + + rootProject.subprojects.each { + coverageFormats = ['html', 'xml'] + coverageDirs << file("${it.buildDir}/classes/main") + coverageSourceDirs << file("${it.projectDir}/src/main/java") + coverageMergeDatafiles << file("${it.buildDir}/cobertura/cobertura.ser") + } +} + + +// JavaDoc Requirements //////////////////////////////////////////////////////// + +configurations { + doclet +} + +dependencies { + doclet group: 'org.jboss.apiviz', name: 'apiviz', version: '1.3.2.GA' +} + + +// Sub-Project Settings and Hooks ////////////////////////////////////////////// + +subprojects { + apply plugin: 'java' + apply plugin: 'eclipse' + apply plugin: 'cobertura' + + group = 'org.syncany' + + sourceCompatibility = 1.7 + targetCompatibility = 1.7 + + repositories { + mavenCentral() + } + + sourceSets { + main { + java { srcDir 'src/main/java'} + resources { srcDir 'src/main/resources'} + } + + test { + java { srcDir 'src/test/java'} + resources { srcDir 'src/test/resources'} + } + } + + processResources { + filter{ String line -> line.replaceAll('%applicationRelease%', "${applicationRelease}") } + filter{ String line -> line.replaceAll('%applicationVersion%', "${applicationVersion}") } + filter{ String line -> line.replaceAll('%applicationVersionFull%', "${applicationVersionFull}") } + filter{ String line -> line.replaceAll('%applicationRevision%', "${applicationRevision}") } + filter{ String line -> line.replaceAll('%applicationDate%', "${applicationDate}") } + } + + task testAllLong(type: Test, dependsOn: testClasses, group: 'Verification') { + description = "Test long running scenarios" + ignoreFailures = true + maxParallelForks = 2 + testLogging { events 'started', 'passed'} + include '**/LongRunning*' + } + + task testScenario(type: Test, dependsOn: testClasses, group: 'Verification') { + description = "Test all scenarios" + ignoreFailures = true + maxParallelForks = 2 + testLogging { events 'started', 'passed'} + include '**/*ScenarioTest*' + } + + task testAll(type: Test, dependsOn: testClasses, group: 'Verification') { + description = "All tests" + ignoreFailures = true + maxParallelForks = 2 + testLogging { events 'started', 'passed'} + exclude '**/*TestSuite*' + } + + task testAllButLongCrypto(type: Test, dependsOn: testClasses, group: 'Verification') { + jvmArgs '-Dcrypto.enable=true' + description = "All tests except long running with crypto" + ignoreFailures = true + maxParallelForks = 2 + testLogging { events 'started', 'passed'} + exclude '**/LongRunning*', '**/*TestSuite*' + } + + test { + group = "verification" + description = "All tests except long running" + ignoreFailures = true + maxParallelForks = 2 + testLogging { events 'started', 'passed'} + exclude '**/LongRunning*', '**/*TestSuite*' + } + + // JAR ///////////////////////////////////////////////////////////////////// + + jar { + baseName = "${project.name}" + version = "$applicationVersion" + } + + + // Test JARs /////////////////////////////////////////////////////////////// + + task testJar(type: Jar, dependsOn: testClasses) { + baseName = "test-${project.archivesBaseName}" + from sourceSets.test.output + } + + + configurations { + tests + } + + + artifacts { + tests testJar + } + + // Eclipse Settings and Hooks ////////////////////////////////////////////// + + eclipse { + classpath { + downloadSources = true + } + + jdt { + sourceCompatibility = 1.7 + targetCompatibility = 1.7 + } + } + + task eclipseSettings(type: Copy) { + from rootProject.files( + "gradle/eclipse/org.eclipse.jdt.ui.prefs", + "gradle/eclipse/org.eclipse.jdt.core.prefs" + ) + + into project.file('.settings/') + + outputs.upToDateWhen { + false + } + } + + task cleanEclipseJdtUi(type: Delete) { + delete project.file(".settings/") + delete project.file("bin/") + } + + tasks["cleanEclipse"].dependsOn(cleanEclipseJdtUi) + tasks["eclipse"].dependsOn(eclipseSettings) +} + + +// JavaDoc ///////////////////////////////////////////////////////////////////// + +task javadocAll(type: Javadoc) { + group = "documentation" + description = "Creates the JavaDoc for all subprojects and puts it into build/javadoc" + + source subprojects.collect { project -> project.sourceSets.main.allJava } + classpath = files(subprojects.collect { project -> project.sourceSets.main.compileClasspath }) + destinationDir = new File(projectDir, 'build/javadoc') + + doFirst { + subprojects.each { project -> project.sourceSets.main.output.each { dir -> dir.mkdirs() } } + } + + options.linkSource = true + options.addStringOption('sourceclasspath', files(subprojects.collect { project -> project.sourceSets.main.output }).getAsPath()) + + configure(options) { + doclet "org.jboss.apiviz.APIviz" + docletpath file(configurations.doclet.asPath) + windowTitle = 'Syncany API Documentation' + docTitle = "Syncany JavaDoc ($applicationVersion)" + bottom = " \ +
\ + Syncany is an open-source cloud storage and filesharing application.

\ + Code located at https://github.com/binwiederhier/syncany
\ + JavaDoc for version $applicationVersion generated based on commit $applicationRevision at $applicationDate

\ + Copyright © 2011-2014 Philipp C. Heckel \ +
\ + " + } +} + +task cleanJavadocAll(type: Delete) { + group = "documentation" + description = "Deletes the all subprojects from build/javadoc (completent to javadocAll)" + delete 'build/javadoc' +} + + +// Gradle Wrapper Tasks (for local gradlew scripts) //////////////////////////// + +task wrapper(type: Wrapper) { + gradleVersion = '1.11' + jarFile = 'gradle/wrapper/wrapper.jar' +} + + +// Task to clean build folder on project root ////////////////////////////////// + +task cleanBuildDir(type: Delete) { + delete 'build' +} + +tasks["clean"].dependsOn(cleanBuildDir) + + +// Global Tests //////////////////////////////////////////////////////////////// + +task testGlobal(type: TestReport) { + group = "verification" + description = "All the results from the 'test' task in all subprojects (global report!)" + destinationDir = file("$buildDir/reports/tests") + reportOn subprojects*.test +} diff --git a/core/gradle/arch/syncany-git/PKGBUILD b/core/gradle/arch/syncany-git/PKGBUILD new file mode 100644 index 00000000..6ae509cd --- /dev/null +++ b/core/gradle/arch/syncany-git/PKGBUILD @@ -0,0 +1,31 @@ +# Maintainer: Armin Fisslthaler +pkgname=syncany-git +pkgver=0.1.1.alpha.gce6bd65 +pkgrel=1 +pkgdesc="An open-source cloud storage and filesharing application (a Dropbox work-alike with more flexibility in terms of storage type and provider)" +arch=(any) +url=http://www.syncany.org/ +license=(GPL2) +depends=('java-runtime>=7') +makedepends=(git) +source=("${pkgname}"::'git+http://github.com/binwiederhier/syncany') +md5sums=('SKIP') + +pkgver(){ + cd "$srcdir/$pkgname" + echo $(grep 'applicationVersion =' build.gradle | cut -d'"' -f2 | sed 's/-/./g').g$(git rev-parse --short HEAD) +} + +build(){ + cd "$srcdir/$pkgname" + ./gradlew installApp +} + +package(){ + install -Dm755 "$srcdir/$pkgname/gradle/arch/syncany/syncany" "${pkgdir}/usr/bin/syncany" + + cd "$srcdir/$pkgname/syncany-cli/build/install/syncany/lib" + for jar in *; do + install -Dm644 "$jar" "${pkgdir}/usr/share/java/syncany/$jar" + done +} diff --git a/core/gradle/arch/syncany/PKGBUILD b/core/gradle/arch/syncany/PKGBUILD new file mode 100644 index 00000000..ec35344c --- /dev/null +++ b/core/gradle/arch/syncany/PKGBUILD @@ -0,0 +1,23 @@ +# Maintainer: Pim Otte +pkgname=syncany +pkgver=0.1.1_alpha +_realver=0.1.1-alpha +pkgrel=2 +pkgdesc="Cloud storage and filesharing application with a focus on security and abstraction of storage." +arch=(any) +url="http://www.syncany.org/" +license=('GPL2') +depends=('java-runtime>=7' 'sh') +source=("http://syncany.org/dist/$pkgname-${_realver}.tar.gz" + syncany) +sha256sums=('f7d475f483d399e19b9275587dc339b10e0f2a01f5f2c7c6e57fabd1c431fc83' + 'c8492da21054f29ed09e5016502199457042c9af4d5a31d2a18622f2b15892b0') + +package() { + install -Dm755 syncany "${pkgdir}/usr/bin/syncany" + cd "$srcdir/$pkgname-${_realver}/lib" + for jar in * + do + install -Dm644 "$jar" "${pkgdir}/usr/share/java/${pkgname}/$jar" + done +} diff --git a/core/gradle/arch/syncany/syncany b/core/gradle/arch/syncany/syncany new file mode 100755 index 00000000..55dae47c --- /dev/null +++ b/core/gradle/arch/syncany/syncany @@ -0,0 +1,5 @@ +#!/bin/sh +for name in /usr/share/java/syncany/*.jar ; do + CP=$CP:$name +done +"$JAVA_HOME/bin/java" -cp $CP org.syncany.Syncany "$@" diff --git a/core/gradle/eclipse/org.eclipse.jdt.core.prefs b/core/gradle/eclipse/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..8e11e43a --- /dev/null +++ b/core/gradle/eclipse/org.eclipse.jdt.core.prefs @@ -0,0 +1,291 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.line_length=150 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=true +org.eclipse.jdt.core.formatter.join_wrapped_lines=true +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=150 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=false +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true diff --git a/core/gradle/eclipse/org.eclipse.jdt.ui.prefs b/core/gradle/eclipse/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000..99a01c44 --- /dev/null +++ b/core/gradle/eclipse/org.eclipse.jdt.ui.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +formatter_profile=_Syncany Formatter Profile +formatter_settings_version=12 +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.text.custom_code_templates=