diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000..6a5c233
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,15 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+buildscript {
+ repositories {
+ jcenter()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:1.3.0'
+ }
+}
+
+allprojects {
+ repositories {
+ jcenter()
+ }
+}
diff --git a/build/intermediates/dex-cache/cache.xml b/build/intermediates/dex-cache/cache.xml
new file mode 100644
index 0000000..e426ca0
--- /dev/null
+++ b/build/intermediates/dex-cache/cache.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/demo/.gitignore b/demo/.gitignore
deleted file mode 100644
index fb8e9e0..0000000
--- a/demo/.gitignore
+++ /dev/null
@@ -1,20 +0,0 @@
-# built application files
-*.apk
-*.ap_
-
-# files for the dex VM
-*.dex
-
-# Java class files
-*.class
-
-# generated files
-bin/
-gen/
-
-# Local configuration file (sdk path, etc)
-local.properties
-
-# Eclipse project files
-.classpath
-.project
diff --git a/demo/ant.properties b/demo/ant.properties
deleted file mode 100644
index 73031c7..0000000
--- a/demo/ant.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-# This file is used to override default values used by the Ant build system.
-#
-# This file must be checked into Version Control Systems, as it is
-# integral to the build system of your project.
-
-# This file is only used by the Ant script.
-
-# You can use this to override default values such as
-# 'source.dir' for the location of your java source folder and
-# 'out.dir' for the location of your output folder.
-
-# You can also use it define how the release builds are signed by declaring
-# the following properties:
-# 'key.store' for the location of your keystore and
-# 'key.alias' for the name of the key to use.
-# The password will be asked during the build when you use the 'release' target.
diff --git a/demo/app-description.txt b/demo/app-description.txt
deleted file mode 100644
index 8e2ba2e..0000000
--- a/demo/app-description.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-This is a demo app for the DragSortListView library. The project is
-hosted on GitHub with repo name: drag-sort-listview.
-
-DragSortListView is an extension of Android's ListView widget that
-mediates drag-and-drop reordering of list items. Its primary purpose
-is to provide an empty "drop slot" that tracks the dragged item,
-effectively reordering the list on-the-fly. DragSortListView also
-handles the tricky task of scrolling while dragging items over a long
-list. Animated transitions give the process a seamless and intuitive
-feel.
-
-Several convenience features accompany the basic functionality
-described above. The most common drag initiation and item removal
-techniques have been implemented for you and are accessed through
-simple XML attributes:
- • Drag initiation: on touch, on drag, on long-press
- • Item removal: on click, on fling, on slide
-
-The first demo, "Basic usage playground," exposes the basic
-features of the library through the menu. You can dynamically
-change drag initiation and item removal methods and add
-headers/footers to the list. The rest of the demos address more
-advanced usage.
-
-As you know, issues with the library that are voiced in the
-comments will go unnoticed and left to wither. Please open an
-issue ticket on the GitHub project page, or email me directly.
-Thanks and happy dragging!
diff --git a/demo/build.gradle b/demo/build.gradle
new file mode 100644
index 0000000..be4e3a4
--- /dev/null
+++ b/demo/build.gradle
@@ -0,0 +1,24 @@
+apply plugin: 'com.android.application'
+
+android {
+ compileSdkVersion 16
+ buildToolsVersion "23.0.2"
+
+ defaultConfig {
+ applicationId "com.mobeta.android.demodslv"
+ minSdkVersion 7
+ targetSdkVersion 14
+ }
+
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
+ }
+ }
+}
+
+dependencies {
+ compile project(':library')
+ compile 'com.android.support:support-v4:18.0.0'
+}
diff --git a/demo/build.xml b/demo/build.xml
deleted file mode 100644
index 560710e..0000000
--- a/demo/build.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/demo/demo.iml b/demo/demo.iml
new file mode 100644
index 0000000..695c013
--- /dev/null
+++ b/demo/demo.iml
@@ -0,0 +1,94 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ generateDebugAndroidTestSources
+ generateDebugSources
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/demo/libs/android-support-v4.jar b/demo/libs/android-support-v4.jar
deleted file mode 100644
index feaf44f..0000000
Binary files a/demo/libs/android-support-v4.jar and /dev/null differ
diff --git a/demo/pom.xml b/demo/pom.xml
deleted file mode 100644
index 8e40f94..0000000
--- a/demo/pom.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
- 4.0.0
-
-
- com.mobeta.android.dslv
- parent
- 0.6.1-SNAPSHOT
- ../pom.xml
-
-
- com.mobeta.android.demodslv
- drag-sort-listview-demo
- apk
- 0.6.1-SNAPSHOT
-
-
-
- com.mobeta.android.dslv
- drag-sort-listview
- ${project.version}
- apklib
-
-
- com.google.android
- android
- provided
-
-
- com.google.android
- support-v4
-
-
-
-
- src
- test
-
-
-
- com.jayway.maven.plugins.android.generation2
- android-maven-plugin
-
-
- org.apache.maven.plugins
- maven-eclipse-plugin
-
-
-
-
diff --git a/demo/proguard-project.txt b/demo/proguard-project.txt
deleted file mode 100644
index f2fe155..0000000
--- a/demo/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-# To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
diff --git a/demo/project.properties b/demo/project.properties
deleted file mode 100644
index 488ad44..0000000
--- a/demo/project.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-# This file is automatically generated by Android Tools.
-# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-#
-# This file must be checked in Version Control Systems.
-#
-# To customize properties used by the Ant build system edit
-# "ant.properties", and override values to adapt the script to your
-# project structure.
-#
-# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
-#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
-
-# Project target.
-target=android-16
-android.library.reference.1=../library/
diff --git a/demo/AndroidManifest.xml b/demo/src/main/AndroidManifest.xml
similarity index 100%
rename from demo/AndroidManifest.xml
rename to demo/src/main/AndroidManifest.xml
diff --git a/demo/src/com/mobeta/android/demodslv/ArbItemSizeDSLV.java b/demo/src/main/java/com/mobeta/android/demodslv/ArbItemSizeDSLV.java
similarity index 100%
rename from demo/src/com/mobeta/android/demodslv/ArbItemSizeDSLV.java
rename to demo/src/main/java/com/mobeta/android/demodslv/ArbItemSizeDSLV.java
diff --git a/demo/src/com/mobeta/android/demodslv/BGHandle.java b/demo/src/main/java/com/mobeta/android/demodslv/BGHandle.java
similarity index 100%
rename from demo/src/com/mobeta/android/demodslv/BGHandle.java
rename to demo/src/main/java/com/mobeta/android/demodslv/BGHandle.java
diff --git a/demo/src/com/mobeta/android/demodslv/CheckableLinearLayout.java b/demo/src/main/java/com/mobeta/android/demodslv/CheckableLinearLayout.java
similarity index 100%
rename from demo/src/com/mobeta/android/demodslv/CheckableLinearLayout.java
rename to demo/src/main/java/com/mobeta/android/demodslv/CheckableLinearLayout.java
diff --git a/demo/src/com/mobeta/android/demodslv/CursorDSLV.java b/demo/src/main/java/com/mobeta/android/demodslv/CursorDSLV.java
similarity index 100%
rename from demo/src/com/mobeta/android/demodslv/CursorDSLV.java
rename to demo/src/main/java/com/mobeta/android/demodslv/CursorDSLV.java
diff --git a/demo/src/com/mobeta/android/demodslv/DSLVFragment.java b/demo/src/main/java/com/mobeta/android/demodslv/DSLVFragment.java
similarity index 100%
rename from demo/src/com/mobeta/android/demodslv/DSLVFragment.java
rename to demo/src/main/java/com/mobeta/android/demodslv/DSLVFragment.java
diff --git a/demo/src/com/mobeta/android/demodslv/DSLVFragmentBGHandle.java b/demo/src/main/java/com/mobeta/android/demodslv/DSLVFragmentBGHandle.java
similarity index 100%
rename from demo/src/com/mobeta/android/demodslv/DSLVFragmentBGHandle.java
rename to demo/src/main/java/com/mobeta/android/demodslv/DSLVFragmentBGHandle.java
diff --git a/demo/src/com/mobeta/android/demodslv/DSLVFragmentClicks.java b/demo/src/main/java/com/mobeta/android/demodslv/DSLVFragmentClicks.java
similarity index 100%
rename from demo/src/com/mobeta/android/demodslv/DSLVFragmentClicks.java
rename to demo/src/main/java/com/mobeta/android/demodslv/DSLVFragmentClicks.java
diff --git a/demo/src/com/mobeta/android/demodslv/DragInitModeDialog.java b/demo/src/main/java/com/mobeta/android/demodslv/DragInitModeDialog.java
similarity index 100%
rename from demo/src/com/mobeta/android/demodslv/DragInitModeDialog.java
rename to demo/src/main/java/com/mobeta/android/demodslv/DragInitModeDialog.java
diff --git a/demo/src/com/mobeta/android/demodslv/EnablesDialog.java b/demo/src/main/java/com/mobeta/android/demodslv/EnablesDialog.java
similarity index 100%
rename from demo/src/com/mobeta/android/demodslv/EnablesDialog.java
rename to demo/src/main/java/com/mobeta/android/demodslv/EnablesDialog.java
diff --git a/demo/src/com/mobeta/android/demodslv/Launcher.java b/demo/src/main/java/com/mobeta/android/demodslv/Launcher.java
similarity index 100%
rename from demo/src/com/mobeta/android/demodslv/Launcher.java
rename to demo/src/main/java/com/mobeta/android/demodslv/Launcher.java
diff --git a/demo/src/com/mobeta/android/demodslv/MultipleChoiceListView.java b/demo/src/main/java/com/mobeta/android/demodslv/MultipleChoiceListView.java
similarity index 100%
rename from demo/src/com/mobeta/android/demodslv/MultipleChoiceListView.java
rename to demo/src/main/java/com/mobeta/android/demodslv/MultipleChoiceListView.java
diff --git a/demo/src/com/mobeta/android/demodslv/RemoveModeDialog.java b/demo/src/main/java/com/mobeta/android/demodslv/RemoveModeDialog.java
similarity index 100%
rename from demo/src/com/mobeta/android/demodslv/RemoveModeDialog.java
rename to demo/src/main/java/com/mobeta/android/demodslv/RemoveModeDialog.java
diff --git a/demo/src/com/mobeta/android/demodslv/Sections.java b/demo/src/main/java/com/mobeta/android/demodslv/Sections.java
similarity index 100%
rename from demo/src/com/mobeta/android/demodslv/Sections.java
rename to demo/src/main/java/com/mobeta/android/demodslv/Sections.java
diff --git a/demo/src/com/mobeta/android/demodslv/SingleChoiceListView.java b/demo/src/main/java/com/mobeta/android/demodslv/SingleChoiceListView.java
similarity index 100%
rename from demo/src/com/mobeta/android/demodslv/SingleChoiceListView.java
rename to demo/src/main/java/com/mobeta/android/demodslv/SingleChoiceListView.java
diff --git a/demo/src/com/mobeta/android/demodslv/TestBedDSLV.java b/demo/src/main/java/com/mobeta/android/demodslv/TestBedDSLV.java
similarity index 100%
rename from demo/src/com/mobeta/android/demodslv/TestBedDSLV.java
rename to demo/src/main/java/com/mobeta/android/demodslv/TestBedDSLV.java
diff --git a/demo/src/com/mobeta/android/demodslv/WarpDSLV.java b/demo/src/main/java/com/mobeta/android/demodslv/WarpDSLV.java
similarity index 100%
rename from demo/src/com/mobeta/android/demodslv/WarpDSLV.java
rename to demo/src/main/java/com/mobeta/android/demodslv/WarpDSLV.java
diff --git a/demo/res/drawable-hdpi/delete_x.png b/demo/src/main/res/drawable-hdpi/delete_x.png
similarity index 100%
rename from demo/res/drawable-hdpi/delete_x.png
rename to demo/src/main/res/drawable-hdpi/delete_x.png
diff --git a/demo/res/drawable-hdpi/drag.9.png b/demo/src/main/res/drawable-hdpi/drag.9.png
similarity index 100%
rename from demo/res/drawable-hdpi/drag.9.png
rename to demo/src/main/res/drawable-hdpi/drag.9.png
diff --git a/demo/res/drawable-hdpi/dslv_launcher.png b/demo/src/main/res/drawable-hdpi/dslv_launcher.png
similarity index 100%
rename from demo/res/drawable-hdpi/dslv_launcher.png
rename to demo/src/main/res/drawable-hdpi/dslv_launcher.png
diff --git a/demo/res/drawable-ldpi/dslv_launcher.png b/demo/src/main/res/drawable-ldpi/dslv_launcher.png
similarity index 100%
rename from demo/res/drawable-ldpi/dslv_launcher.png
rename to demo/src/main/res/drawable-ldpi/dslv_launcher.png
diff --git a/demo/res/drawable-mdpi/drag.9.png b/demo/src/main/res/drawable-mdpi/drag.9.png
similarity index 100%
rename from demo/res/drawable-mdpi/drag.9.png
rename to demo/src/main/res/drawable-mdpi/drag.9.png
diff --git a/demo/res/drawable-mdpi/dslv_launcher.png b/demo/src/main/res/drawable-mdpi/dslv_launcher.png
similarity index 100%
rename from demo/res/drawable-mdpi/dslv_launcher.png
rename to demo/src/main/res/drawable-mdpi/dslv_launcher.png
diff --git a/demo/res/drawable-xhdpi/dslv_launcher.png b/demo/src/main/res/drawable-xhdpi/dslv_launcher.png
similarity index 100%
rename from demo/res/drawable-xhdpi/dslv_launcher.png
rename to demo/src/main/res/drawable-xhdpi/dslv_launcher.png
diff --git a/demo/res/drawable/bg_handle.xml b/demo/src/main/res/drawable/bg_handle.xml
similarity index 100%
rename from demo/res/drawable/bg_handle.xml
rename to demo/src/main/res/drawable/bg_handle.xml
diff --git a/demo/res/drawable/bg_handle_section1.xml b/demo/src/main/res/drawable/bg_handle_section1.xml
similarity index 100%
rename from demo/res/drawable/bg_handle_section1.xml
rename to demo/src/main/res/drawable/bg_handle_section1.xml
diff --git a/demo/res/drawable/bg_handle_section1_selector.xml b/demo/src/main/res/drawable/bg_handle_section1_selector.xml
similarity index 100%
rename from demo/res/drawable/bg_handle_section1_selector.xml
rename to demo/src/main/res/drawable/bg_handle_section1_selector.xml
diff --git a/demo/res/drawable/bg_handle_section2.xml b/demo/src/main/res/drawable/bg_handle_section2.xml
similarity index 100%
rename from demo/res/drawable/bg_handle_section2.xml
rename to demo/src/main/res/drawable/bg_handle_section2.xml
diff --git a/demo/res/drawable/bg_handle_section2_selector.xml b/demo/src/main/res/drawable/bg_handle_section2_selector.xml
similarity index 100%
rename from demo/res/drawable/bg_handle_section2_selector.xml
rename to demo/src/main/res/drawable/bg_handle_section2_selector.xml
diff --git a/demo/res/drawable/drag.9.png b/demo/src/main/res/drawable/drag.9.png
similarity index 100%
rename from demo/res/drawable/drag.9.png
rename to demo/src/main/res/drawable/drag.9.png
diff --git a/demo/res/drawable/section_div.xml b/demo/src/main/res/drawable/section_div.xml
similarity index 100%
rename from demo/res/drawable/section_div.xml
rename to demo/src/main/res/drawable/section_div.xml
diff --git a/demo/res/layout/bg_handle_main.xml b/demo/src/main/res/layout/bg_handle_main.xml
similarity index 100%
rename from demo/res/layout/bg_handle_main.xml
rename to demo/src/main/res/layout/bg_handle_main.xml
diff --git a/demo/res/layout/checkable_main.xml b/demo/src/main/res/layout/checkable_main.xml
similarity index 100%
rename from demo/res/layout/checkable_main.xml
rename to demo/src/main/res/layout/checkable_main.xml
diff --git a/demo/res/layout/cursor_main.xml b/demo/src/main/res/layout/cursor_main.xml
similarity index 100%
rename from demo/res/layout/cursor_main.xml
rename to demo/src/main/res/layout/cursor_main.xml
diff --git a/demo/res/layout/dslv_fragment_main.xml b/demo/src/main/res/layout/dslv_fragment_main.xml
similarity index 100%
rename from demo/res/layout/dslv_fragment_main.xml
rename to demo/src/main/res/layout/dslv_fragment_main.xml
diff --git a/demo/res/layout/header_footer.xml b/demo/src/main/res/layout/header_footer.xml
similarity index 100%
rename from demo/res/layout/header_footer.xml
rename to demo/src/main/res/layout/header_footer.xml
diff --git a/demo/res/layout/hetero_main.xml b/demo/src/main/res/layout/hetero_main.xml
similarity index 100%
rename from demo/res/layout/hetero_main.xml
rename to demo/src/main/res/layout/hetero_main.xml
diff --git a/demo/res/layout/jazz_artist_list_item.xml b/demo/src/main/res/layout/jazz_artist_list_item.xml
similarity index 100%
rename from demo/res/layout/jazz_artist_list_item.xml
rename to demo/src/main/res/layout/jazz_artist_list_item.xml
diff --git a/demo/res/layout/launcher.xml b/demo/src/main/res/layout/launcher.xml
similarity index 100%
rename from demo/res/layout/launcher.xml
rename to demo/src/main/res/layout/launcher.xml
diff --git a/demo/res/layout/launcher_item.xml b/demo/src/main/res/layout/launcher_item.xml
similarity index 100%
rename from demo/res/layout/launcher_item.xml
rename to demo/src/main/res/layout/launcher_item.xml
diff --git a/demo/res/layout/list_item_bg_handle.xml b/demo/src/main/res/layout/list_item_bg_handle.xml
similarity index 100%
rename from demo/res/layout/list_item_bg_handle.xml
rename to demo/src/main/res/layout/list_item_bg_handle.xml
diff --git a/demo/res/layout/list_item_checkable.xml b/demo/src/main/res/layout/list_item_checkable.xml
similarity index 100%
rename from demo/res/layout/list_item_checkable.xml
rename to demo/src/main/res/layout/list_item_checkable.xml
diff --git a/demo/res/layout/list_item_click_remove.xml b/demo/src/main/res/layout/list_item_click_remove.xml
similarity index 100%
rename from demo/res/layout/list_item_click_remove.xml
rename to demo/src/main/res/layout/list_item_click_remove.xml
diff --git a/demo/res/layout/list_item_handle_left.xml b/demo/src/main/res/layout/list_item_handle_left.xml
similarity index 100%
rename from demo/res/layout/list_item_handle_left.xml
rename to demo/src/main/res/layout/list_item_handle_left.xml
diff --git a/demo/res/layout/list_item_handle_right.xml b/demo/src/main/res/layout/list_item_handle_right.xml
similarity index 100%
rename from demo/res/layout/list_item_handle_right.xml
rename to demo/src/main/res/layout/list_item_handle_right.xml
diff --git a/demo/res/layout/list_item_no_handle.xml b/demo/src/main/res/layout/list_item_no_handle.xml
similarity index 100%
rename from demo/res/layout/list_item_no_handle.xml
rename to demo/src/main/res/layout/list_item_no_handle.xml
diff --git a/demo/res/layout/list_item_radio.xml b/demo/src/main/res/layout/list_item_radio.xml
similarity index 100%
rename from demo/res/layout/list_item_radio.xml
rename to demo/src/main/res/layout/list_item_radio.xml
diff --git a/demo/res/layout/section_div.xml b/demo/src/main/res/layout/section_div.xml
similarity index 100%
rename from demo/res/layout/section_div.xml
rename to demo/src/main/res/layout/section_div.xml
diff --git a/demo/res/layout/sections_main.xml b/demo/src/main/res/layout/sections_main.xml
similarity index 100%
rename from demo/res/layout/sections_main.xml
rename to demo/src/main/res/layout/sections_main.xml
diff --git a/demo/res/layout/test_bed_main.xml b/demo/src/main/res/layout/test_bed_main.xml
similarity index 100%
rename from demo/res/layout/test_bed_main.xml
rename to demo/src/main/res/layout/test_bed_main.xml
diff --git a/demo/res/layout/warp_main.xml b/demo/src/main/res/layout/warp_main.xml
similarity index 100%
rename from demo/res/layout/warp_main.xml
rename to demo/src/main/res/layout/warp_main.xml
diff --git a/demo/res/menu/mode_menu.xml b/demo/src/main/res/menu/mode_menu.xml
similarity index 100%
rename from demo/res/menu/mode_menu.xml
rename to demo/src/main/res/menu/mode_menu.xml
diff --git a/demo/res/values/colors.xml b/demo/src/main/res/values/colors.xml
similarity index 100%
rename from demo/res/values/colors.xml
rename to demo/src/main/res/values/colors.xml
diff --git a/demo/res/values/dimens.xml b/demo/src/main/res/values/dimens.xml
similarity index 100%
rename from demo/res/values/dimens.xml
rename to demo/src/main/res/values/dimens.xml
diff --git a/demo/res/values/ids.xml b/demo/src/main/res/values/ids.xml
similarity index 100%
rename from demo/res/values/ids.xml
rename to demo/src/main/res/values/ids.xml
diff --git a/demo/res/values/strings.xml b/demo/src/main/res/values/strings.xml
similarity index 100%
rename from demo/res/values/strings.xml
rename to demo/src/main/res/values/strings.xml
diff --git a/dslv.iml b/dslv.iml
new file mode 100644
index 0000000..bc64e54
--- /dev/null
+++ b/dslv.iml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..8c0fb64
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..0c71e76
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Wed Apr 10 15:27:10 PDT 2013
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
diff --git a/gradlew b/gradlew
new file mode 100755
index 0000000..91a7e26
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,164 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+ echo "$*"
+}
+
+die ( ) {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+esac
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched.
+if $cygwin ; then
+ [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+fi
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >&-
+APP_HOME="`pwd -P`"
+cd "$SAVED" >&-
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+ JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 0000000..aec9973
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/import-summary.txt b/import-summary.txt
new file mode 100644
index 0000000..c81d49f
--- /dev/null
+++ b/import-summary.txt
@@ -0,0 +1,72 @@
+ECLIPSE ANDROID PROJECT IMPORT SUMMARY
+======================================
+
+Manifest Merging:
+-----------------
+Your project uses libraries that provide manifests, and your Eclipse
+project did not explicitly turn on manifest merging. In Android Gradle
+projects, manifests are always merged (meaning that contents from your
+libraries' manifests will be merged into the app manifest. If you had
+manually copied contents from library manifests into your app manifest
+you may need to remove these for the app to build correctly.
+
+Ignored Files:
+--------------
+The following files were *not* copied into the new Gradle project; you
+should evaluate whether these are still needed in your project and if
+so manually move them:
+
+From demo:
+* .gitignore
+* ant.properties
+* app-description.txt
+* build.xml
+* pom.xml
+* proguard-project.txt
+From library:
+* .gitignore
+* ant.properties
+* build.xml
+* pom.xml
+* proguard-project.txt
+
+Replaced Jars with Dependencies:
+--------------------------------
+The importer recognized the following .jar files as third party
+libraries and replaced them with Gradle dependencies instead. This has
+the advantage that more explicit version information is known, and the
+libraries can be updated automatically. However, it is possible that
+the .jar file in your project was of an older version than the
+dependency we picked, which could render the project not compileable.
+You can disable the jar replacement in the import wizard and try again:
+
+android-support-v4.jar => com.android.support:support-v4:18.0.0
+
+Moved Files:
+------------
+Android Gradle projects use a different directory structure than ADT
+Eclipse projects. Here's how the projects were restructured:
+
+In library:
+* AndroidManifest.xml => library/src/main/AndroidManifest.xml
+* res/ => library/src/main/res/
+* src/ => library/src/main/java/
+In demo:
+* AndroidManifest.xml => demo/src/main/AndroidManifest.xml
+* res/ => demo/src/main/res/
+* src/ => demo/src/main/java/
+
+Next Steps:
+-----------
+You can now build the project. The Gradle project needs network
+connectivity to download dependencies.
+
+Bugs:
+-----
+If for some reason your project does not build, and you determine that
+it is due to a bug or limitation of the Eclipse to Gradle importer,
+please file a bug at http://b.android.com with category
+Component-Tools.
+
+(This import summary is for your information only, and can be deleted
+after import once you are satisfied with the results.)
diff --git a/library/.gitignore b/library/.gitignore
deleted file mode 100644
index a45024b..0000000
--- a/library/.gitignore
+++ /dev/null
@@ -1,22 +0,0 @@
-# built application files
-*.apk
-*.ap_
-
-# files for the dex VM
-*.dex
-
-# Java class files
-*.class
-
-# generated files
-bin/
-gen/
-target/
-
-# Local configuration file (sdk path, etc)
-local.properties
-.gitattributes
-
-# Eclipse project files
-.classpath
-.project
diff --git a/library/ant.properties b/library/ant.properties
deleted file mode 100644
index b0971e8..0000000
--- a/library/ant.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-# This file is used to override default values used by the Ant build system.
-#
-# This file must be checked into Version Control Systems, as it is
-# integral to the build system of your project.
-
-# This file is only used by the Ant script.
-
-# You can use this to override default values such as
-# 'source.dir' for the location of your java source folder and
-# 'out.dir' for the location of your output folder.
-
-# You can also use it define how the release builds are signed by declaring
-# the following properties:
-# 'key.store' for the location of your keystore and
-# 'key.alias' for the name of the key to use.
-# The password will be asked during the build when you use the 'release' target.
-
diff --git a/library/build.gradle b/library/build.gradle
new file mode 100644
index 0000000..f0f46e0
--- /dev/null
+++ b/library/build.gradle
@@ -0,0 +1,22 @@
+apply plugin: 'com.android.library'
+
+android {
+ compileSdkVersion 7
+ buildToolsVersion "23.0.2"
+
+ defaultConfig {
+ minSdkVersion 7
+ targetSdkVersion 7
+ }
+
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
+ }
+ }
+}
+
+dependencies {
+ compile 'com.android.support:support-v4:18.0.0'
+}
diff --git a/library/build.xml b/library/build.xml
deleted file mode 100644
index 5f6ada9..0000000
--- a/library/build.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/library/library.iml b/library/library.iml
new file mode 100644
index 0000000..180ed75
--- /dev/null
+++ b/library/library.iml
@@ -0,0 +1,94 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ generateDebugAndroidTestSources
+ generateDebugSources
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/library/libs/android-support-v4.jar b/library/libs/android-support-v4.jar
deleted file mode 100644
index feaf44f..0000000
Binary files a/library/libs/android-support-v4.jar and /dev/null differ
diff --git a/library/pom.xml b/library/pom.xml
deleted file mode 100644
index 53880ca..0000000
--- a/library/pom.xml
+++ /dev/null
@@ -1,89 +0,0 @@
-
-
-
- 4.0.0
-
- com.mobeta.android.dslv
- drag-sort-listview
- apklib
- 0.6.1-SNAPSHOT
-
-
- com.mobeta.android.dslv
- parent
- 0.6.1-SNAPSHOT
- ../pom.xml
-
-
-
-
- com.google.android
- android
- provided
-
-
- com.google.android
- support-v4
- true
-
-
-
-
- src
- test
-
-
-
- com.jayway.maven.plugins.android.generation2
- android-maven-plugin
-
-
- org.apache.maven.plugins
- maven-eclipse-plugin
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- 2.7
-
-
- com.google.doclava
- doclava
- 1.0.5
-
- com.google.doclava.Doclava
-
- ${sun.boot.class.path}
-
- -quiet
- -federate Android http://d.android.com/reference
- -federationxml Android http://doclava.googlecode.com/svn/static/api/android-10.xml
- -hdf project.name "${project.name}"
- -d ${project.build.directory}/apidocs
-
- false
-
- -J-Xmx1024m
-
-
-
-
-
diff --git a/library/proguard-project.txt b/library/proguard-project.txt
deleted file mode 100644
index f2fe155..0000000
--- a/library/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-# To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
diff --git a/library/project.properties b/library/project.properties
deleted file mode 100644
index 0eb624c..0000000
--- a/library/project.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-# This file is automatically generated by Android Tools.
-# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-#
-# This file must be checked in Version Control Systems.
-#
-# To customize properties used by the Ant build system edit
-# "ant.properties", and override values to adapt the script to your
-# project structure.
-#
-# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
-#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
-
-android.library=true
-# Project target.
-target=android-7
diff --git a/library/AndroidManifest.xml b/library/src/main/AndroidManifest.xml
similarity index 100%
rename from library/AndroidManifest.xml
rename to library/src/main/AndroidManifest.xml
diff --git a/library/src/com/mobeta/android/dslv/DragSortController.java b/library/src/main/java/com/mobeta/android/dslv/DragSortController.java
similarity index 100%
rename from library/src/com/mobeta/android/dslv/DragSortController.java
rename to library/src/main/java/com/mobeta/android/dslv/DragSortController.java
diff --git a/library/src/com/mobeta/android/dslv/DragSortCursorAdapter.java b/library/src/main/java/com/mobeta/android/dslv/DragSortCursorAdapter.java
similarity index 100%
rename from library/src/com/mobeta/android/dslv/DragSortCursorAdapter.java
rename to library/src/main/java/com/mobeta/android/dslv/DragSortCursorAdapter.java
diff --git a/library/src/com/mobeta/android/dslv/DragSortItemView.java b/library/src/main/java/com/mobeta/android/dslv/DragSortItemView.java
similarity index 100%
rename from library/src/com/mobeta/android/dslv/DragSortItemView.java
rename to library/src/main/java/com/mobeta/android/dslv/DragSortItemView.java
diff --git a/library/src/com/mobeta/android/dslv/DragSortItemViewCheckable.java b/library/src/main/java/com/mobeta/android/dslv/DragSortItemViewCheckable.java
similarity index 100%
rename from library/src/com/mobeta/android/dslv/DragSortItemViewCheckable.java
rename to library/src/main/java/com/mobeta/android/dslv/DragSortItemViewCheckable.java
diff --git a/library/src/com/mobeta/android/dslv/DragSortListView.java b/library/src/main/java/com/mobeta/android/dslv/DragSortListView.java
similarity index 100%
rename from library/src/com/mobeta/android/dslv/DragSortListView.java
rename to library/src/main/java/com/mobeta/android/dslv/DragSortListView.java
diff --git a/library/src/com/mobeta/android/dslv/ResourceDragSortCursorAdapter.java b/library/src/main/java/com/mobeta/android/dslv/ResourceDragSortCursorAdapter.java
similarity index 100%
rename from library/src/com/mobeta/android/dslv/ResourceDragSortCursorAdapter.java
rename to library/src/main/java/com/mobeta/android/dslv/ResourceDragSortCursorAdapter.java
diff --git a/library/src/com/mobeta/android/dslv/SimpleDragSortCursorAdapter.java b/library/src/main/java/com/mobeta/android/dslv/SimpleDragSortCursorAdapter.java
similarity index 100%
rename from library/src/com/mobeta/android/dslv/SimpleDragSortCursorAdapter.java
rename to library/src/main/java/com/mobeta/android/dslv/SimpleDragSortCursorAdapter.java
diff --git a/library/src/com/mobeta/android/dslv/SimpleFloatViewManager.java b/library/src/main/java/com/mobeta/android/dslv/SimpleFloatViewManager.java
similarity index 100%
rename from library/src/com/mobeta/android/dslv/SimpleFloatViewManager.java
rename to library/src/main/java/com/mobeta/android/dslv/SimpleFloatViewManager.java
diff --git a/library/res/values/dslv_attrs.xml b/library/src/main/res/values/dslv_attrs.xml
similarity index 96%
rename from library/res/values/dslv_attrs.xml
rename to library/src/main/res/values/dslv_attrs.xml
index 8c779c9..6c4d5d7 100644
--- a/library/res/values/dslv_attrs.xml
+++ b/library/src/main/res/values/dslv_attrs.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
index 8b2c6a9..0000000
--- a/pom.xml
+++ /dev/null
@@ -1,84 +0,0 @@
-
-
-
- 4.0.0
-
- com.mobeta.android.dslv
- parent
- 0.6.1-SNAPSHOT
- pom
-
-
- UTF-8
- 2.1_r1
- r7
-
-
-
- library
- demo
-
-
-
- https://github.com/bauerca/drag-sort-listview/
- scm:git:git://github.com/bauerca/drag-sort-listview.git
- scm:git:git@github.com:bauerca/drag-sort-listview.git
-
-
-
-
-
- com.google.android
- android
- ${android.version}
-
-
- com.google.android
- support-v4
- ${android.support-v4.version}
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-release-plugin
- 2.2.2
-
- true
-
-
-
-
-
-
- com.jayway.maven.plugins.android.generation2
- android-maven-plugin
- 3.3.2
- true
-
-
- org.apache.maven.plugins
- maven-eclipse-plugin
- 2.9
-
-
-
-
-
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 0000000..1012564
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1,2 @@
+include ':library'
+include ':demo'