/
build.gradle
103 lines (86 loc) · 2.83 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
apply plugin: 'com.android.library'
apply plugin: 'maven'
/**
In order to push the library to Bintray we need to execute the
following gradle commands in the given sequence.
./gradlew assemble // To generate build folder
./gradlew createPom // To create POM file for maven. if that creates a new file then dont add it to git
./gradlew bintrayUpload // To upload library to bintray
*/
ext {
bintrayRepo = 'maven'
bintrayName = 'VidEffects'
publishedGroupId = 'com.sherazkhilji.videffects'
libraryName = 'VidEffects'
artifact = 'videffects'
libraryDescription = 'It is an Android library uses OpenGL Shaders to apply effects on Videos at Runtime.'
siteUrl = 'https://github.com/krazykira/VidEffects'
gitUrl = 'https://github.com/krazykira/VidEffects.git'
versionCode = 3
libraryVersion = '1.1.0'
developerId = 'krazykira'
developerName = 'Sheraz Ahmed Khilji'
developerEmail = 'sherazkhilji@gmail.com'
licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ["Apache-2.0"]
}
/**
* This is needed because we want to complie this as android library so that we can test it before publishing
*/
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
minSdkVersion 21
targetSdkVersion 29
versionCode versionCode
versionName libraryVersion
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation 'androidx.annotation:annotation:1.1.0'
}
/**
Run this code to create pom-default.xml file in build directory
*/
task createPom doLast {
pom {
project {
// All of these values are defined in the ext block
packaging 'aar'
groupId publishedGroupId
artifactId artifact
version libraryVersion
inceptionYear new Date()
licenses {
license {
name licenseName
url licenseUrl
distribution 'repo'
}
}
developers {
developer {
id developerId
name developerName
email developerEmail
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
}
}
}.writeTo("build/poms/pom-default.xml").writeTo("pom.xml")
}
// Place it at the end of the file
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'