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

Commit 7c0ccfd

Browse files
committed
added file for support gradle structure
1 parent 3bd8ef6 commit 7c0ccfd

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
bin
33
gen
44

5+
/*/build/
6+
57
#Eclipse
68
.project
79
.classpath

library/build.gradle

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
apply plugin: 'com.android.library'
2+
3+
android {
4+
compileSdkVersion 16
5+
buildToolsVersion '19.1.0'
6+
7+
defaultConfig {
8+
minSdkVersion 4
9+
targetSdkVersion 4
10+
}
11+
12+
sourceSets {
13+
main {
14+
manifest {
15+
srcFile 'AndroidManifest.xml'
16+
}
17+
java {
18+
srcDir 'src'
19+
}
20+
res {
21+
srcDir 'res'
22+
}
23+
assets {
24+
srcDir 'assets'
25+
}
26+
resources {
27+
srcDir 'src'
28+
}
29+
}
30+
}
31+
}
32+
33+
android.libraryVariants.all { variant ->
34+
def name = variant.buildType.name
35+
if (!name.equals("debug")) {
36+
def task = project.tasks.create "jar${name.capitalize()}", Jar
37+
task.dependsOn variant.javaCompile
38+
task.from variant.javaCompile.destinationDir
39+
artifacts.add('archives', task);
40+
}
41+
}
42+
43+
44+
buildscript {
45+
repositories {
46+
jcenter()
47+
}
48+
49+
}
50+
51+
allprojects {
52+
repositories {
53+
jcenter()
54+
}
55+
}

0 commit comments

Comments
 (0)