Skip to content

Commit

Permalink
Migrate seadroid to gradle.
Browse files Browse the repository at this point in the history
  • Loading branch information
amuttsch committed Nov 21, 2014
1 parent 1a1e180 commit 8be0a32
Show file tree
Hide file tree
Showing 741 changed files with 10,025 additions and 5,107 deletions.
42 changes: 37 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,46 @@
*~
*#
bin
gen
local.properties
.classpath
.project
.settings
libs
tmp
proguard/
target/
lint.xml

# Built application files
*.apk
*.ap_

# Files for the Dalvik VM
*.dex

# Java class files
*.class

# Generated files
**/bin/
**/gen/

# Gradle files
.gradle/
**/build/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
**/proguard/

# Eclipse project` files
.classpath
.project
**/.settings/

# IntelliJ project files
*.iml
*.ipr
*.iws
.idea/

# Misc
.DS_Store
34 changes: 15 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
#based on https://raw.github.com/leviwilson/android-travis-ci-example/master/.travis.yml
language: java
jdk:
# - openjdk7
- oraclejdk7
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq libstdc++6:i386 lib32z1 expect
- wget http://dl.google.com/android/android-sdk_r23.0.2-linux.tgz
- tar xf android-sdk_r23.0.2-linux.tgz
- export ANDROID_HOME=`pwd`/android-sdk-linux
- export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
- echo "y" | android update sdk -a --filter tools,platform-tools,build-tools-20.0.0,android-19 --no-ui --force
- cd /tmp/
- git clone https://github.com/mosabua/maven-android-sdk-deployer.git
- cd maven-android-sdk-deployer
- mvn clean install -pl platforms/android-19
- cd $TRAVIS_BUILD_DIR
language: android
jdk: oraclejdk7
android:
components:
# Uncomment the lines below if you want to
# use the latest revision of Android SDK Tools
# - platform-tools
# - tools

# The BuildTools version used by your project
- build-tools-21.0.2

# The SDK version used to compile your project
- android-21
script:
- mvn test
- ./gradlew clean assemble
17 changes: 0 additions & 17 deletions ant.properties

This file was deleted.

70 changes: 70 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.13.0'
}
}
apply plugin: 'com.android.application'

repositories {
jcenter()
}

/*
* Gets the version name from the latest Git tag
*/
def getVersionName = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'describe', '--tags'
standardOutput = stdout
}
return stdout.toString().trim()
}
def getVersionCode = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-list', '--count', "HEAD"
standardOutput = stdout
}
return Integer.valueOf(stdout.toString().trim())
}


dependencies {
compile 'com.android.support:support-v4:21.0.+'
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
compile 'com.inkapplications.viewpageindicator:library:2.4.3'
compile 'com.github.kevinsawicki:http-request:5.6'
compile 'commons-io:commons-io:2.4'
compile 'com.google.guava:guava:18.0'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3'
compile project(':libraries:NewQuickAction')
compile project(':libraries:MarkdownView')
compile project(':libraries:PullToRefresh')
}

android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode getVersionCode()
versionName getVersionName()
}

lintOptions {
abortOnError false
}

buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import org.junit.Test;
import org.junit.Assert;

@RunWith(RobolectricTestRunner.class)
public class TestUtils {
@Test
public void testJoinPaths() {
Expand Down
6 changes: 1 addition & 5 deletions AndroidManifest.xml → app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.seafile.seadroid2"
android:versionCode="24"
android:versionName="1.3.0">

<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="19" />
package="com.seafile.seadroid2">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ public GridViewSpecial(Context context, AttributeSet attrs) {

private void init(Context context) {
setVerticalScrollBarEnabled(true);
initializeScrollbars(context.obtainStyledAttributes(
R.styleable.GalleryScrollBar));
//initializeScrollbars(context.obtainStyledAttributes(
// R.styleable.GalleryScrollBar));
mGestureDetector = new GestureDetector(context,
new MyGestureDetector());
setFocusableInTouchMode(true);
Expand Down Expand Up @@ -1157,4 +1157,4 @@ private void cancelAllRequests() {
}
}
}
}
}
File renamed without changes.
Loading

0 comments on commit 8be0a32

Please sign in to comment.