Skip to content
This repository has been archived by the owner on Apr 19, 2018. It is now read-only.

Added minimal support for Gradle, and thus compiling with Android Studio. #381

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#Android generated
bin
gen
build
.gradle

#Eclipse
.project
Expand Down
60 changes: 60 additions & 0 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 16
buildToolsVersion '19.1.0'

defaultConfig {
minSdkVersion 4
targetSdkVersion 4
}

sourceSets {
main {
manifest {
srcFile 'AndroidManifest.xml'
}
java {
srcDir 'src'
}
res {
srcDir 'res'
}
assets {
srcDir 'assets'
}
resources {
srcDir 'src'
}
}
}
}

android.libraryVariants.all { variant ->
def name = variant.buildType.name
if (!name.equals("debug")) {
def task = project.tasks.create "jar${name.capitalize()}", Jar
task.dependsOn variant.javaCompile
task.from variant.javaCompile.destinationDir
artifacts.add('archives', task);
}
}

dependencies {
compile 'com.android.support:support-v4:18.+'
}

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
}
}

allprojects {
repositories {
jcenter()
}
}
1 change: 1 addition & 0 deletions library/settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = 'Android-ViewPagerIndicator'