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

Added minimal support for Gradle, for compiling as gradle module in android studio project #252

Open
wants to merge 1 commit 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
Expand Up @@ -2,6 +2,8 @@
bin
gen

/*/build/

#Eclipse
.project
.classpath
Expand Down
55 changes: 55 additions & 0 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
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);
}
}


buildscript {
repositories {
jcenter()
}

}

allprojects {
repositories {
jcenter()
}
}