This repository has been archived by the owner on Sep 25, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
executable file
·115 lines (100 loc) · 3.21 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
apply plugin: 'com.android.library'
apply plugin: 'bintray-release'
ext {
// Publishing
poetryVersion = '4.0.0'
poetryUserOrg = 'bytewelder'
poetryWebsite = 'https://github.com/ByteWelder/Poetry'
poetryGroupId = 'com.bytewelder.poetry'
poetryRepoName = 'maven-release'
poetryName = 'Poetry'
// Libraries
slf4jVersion = '1.7.24'
ormliteVersion = '5.0'
androidSupportLibraryVersion = '25.1.1'
androidBuildToolsVersion = '25.0.2'
androidTargetSdkVersion = 25
androidCompileSdkVersion = 25
}
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.7'
classpath 'com.novoda:bintray-release:0.4.0'
// bintray usage: ./gradlew clean build bintrayUpload -PbintrayUser=??? -PbintrayKey=??? -PdryRun=false
}
}
repositories {
mavenCentral()
}
dependencies {
compile (
[group: 'com.android.support', name: 'support-v4', version: androidSupportLibraryVersion],
// ORM
[group: 'com.j256.ormlite', name: 'ormlite-core', version: ormliteVersion],
[group: 'com.j256.ormlite', name: 'ormlite-android', version: ormliteVersion],
)
androidTestCompile(
[group: 'org.apache.directory.studio', name: 'org.apache.commons.io', version: '2.4']
)
}
android {
compileSdkVersion androidCompileSdkVersion
buildToolsVersion androidBuildToolsVersion
defaultConfig {
minSdkVersion 16
targetSdkVersion androidTargetSdkVersion
testInstrumentationRunner 'android.test.InstrumentationTestRunner'
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/ASL2.0'
exclude 'META-INF/ASL2.0.txt'
exclude 'LICENSE.txt'
exclude 'LICENSE'
}
lintOptions {
disable 'InvalidPackage'
}
}
android.libraryVariants.all { variant ->
def name = variant.buildType.name
if (name.equals('debug')) {
return; // Skip debug builds.
}
def task = project.tasks.create "jar${name.capitalize()}", Jar
task.dependsOn variant.javaCompile
task.from variant.javaCompile.destinationDir
artifacts.add('archives', task);
}
android.libraryVariants.all { variant ->
task("generate${variant.name.capitalize()}Javadoc", type: Javadoc) {
title = poetryName
description "Generates Javadoc for $variant.name."
source = variant.javaCompile.source
classpath = files(variant.javaCompile.classpath.files, project.android.getBootClasspath())
options {
links "http://docs.oracle.com/javase/7/docs/api/"
linksOffline "https://d.android.com/reference","${android.sdkDirectory}/docs/reference"
}
exclude '**/BuildConfig.java'
exclude '**/R.java'
}
}
publish {
userOrg = poetryUserOrg
repoName = poetryRepoName
groupId = poetryGroupId
artifactId = 'poetry'
version = poetryVersion
description = poetryName
website = poetryWebsite
}