forked from evotor/integration-library
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
108 lines (93 loc) · 2.99 KB
/
build.gradle
File metadata and controls
108 lines (93 loc) · 2.99 KB
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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'maven-publish'
apply plugin: 'org.jetbrains.dokka-android'
android {
def version = 5
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
minSdkVersion 22
targetSdkVersion 25
versionCode version
versionName "0.4.5"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
resValue "integer", "versionCodeIntegrationLibrary", "$version"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
}
dependencies {
compile 'com.android.support:appcompat-v7:25.3.1'
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
compile 'com.github.evotor:push-notifications:v0.2.1'
compile 'com.github.evotor:query-api:1.0.0'
}
repositories {
mavenCentral()
}
buildscript {
ext.kotlin_version = '1.2.71'
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath "org.jetbrains.dokka:dokka-android-gradle-plugin:0.9.15"
}
}
allprojects {
repositories {
jcenter()
maven { url 'https://jitpack.io' }
}
}
dokka {
outputFormat = 'javadoc'
outputDirectory = "$buildDir/javadoc"
}
task sourceJar(type: Jar) {
classifier "sources"
from android.sourceSets.main.java.srcDirs
}
// build a jar with javadoc
task javadocJar(type: Jar, dependsOn: dokka) {
classifier = 'javadoc'
from dokka.outputDirectory
}
publishing {
publications {
mavenKotlin(MavenPublication) {
groupId 'com.github.evotor'
artifactId "integration-library"
version "v1.0.0-LOCAL"
artifact(sourceJar)
artifact(javadocJar)
artifact "${project.buildDir}/outputs/aar/${project.archivesBaseName}-release.aar"
//generate pom nodes for dependencies
pom.withXml {
def dependenciesNode = asNode().appendNode('dependencies')
configurations.compile.allDependencies.each { dependency ->
if (dependency.group) {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', dependency.group)
dependencyNode.appendNode('artifactId', dependency.name)
dependencyNode.appendNode('version', dependency.version)
}
}
}
}
}
}