1
1
apply plugin : ' com.android.library'
2
- apply plugin : ' maven-publish'
3
- apply from : ' publication.gradle'
4
2
5
3
6
- group = " com.yoti.mobile.android "
7
- version = currentVersion
4
+ group = " $p omGroup "
5
+ version = " $p omVersion "
8
6
9
7
10
8
android {
11
9
compileSdkVersion parent. ext. androidCompileSdkVersion
12
- buildToolsVersion parent. ext. androidBuildToolsVersion
13
10
14
11
defaultConfig {
15
12
16
13
minSdkVersion parent. ext. androidMinSdkVersion
17
14
targetSdkVersion parent. ext. androidTargetSdkVersion
18
15
19
16
versionCode currentVersionCode. toInteger()
20
- versionName currentVersion
17
+ versionName pomVersion
21
18
22
- testInstrumentationRunner " android.support.test.runner.AndroidJUnitRunner"
23
- }
24
-
25
- signingConfigs {
26
- debug {
27
- storeFile file(' debug.keystore' )
28
- keyAlias ' androiddebugkey'
29
- keyPassword ' android'
30
- storePassword ' android'
31
- }
32
- release {
33
- storeFile file(' debug.keystore' )
34
- keyAlias ' androiddebugkey'
35
- keyPassword ' android'
36
- storePassword ' android'
37
- }
38
- }
39
-
40
- buildTypes {
41
- debug {
42
- signingConfig signingConfigs. debug
43
- debuggable true
44
- versionNameSuffix " -SNAPSHOT"
45
- }
46
-
47
- release {
48
- minifyEnabled false
49
- proguardFiles getDefaultProguardFile(' proguard-android.txt' ), ' proguard-rules.pro'
50
- signingConfig signingConfigs. release
51
- }
19
+ testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
52
20
}
53
21
54
22
testOptions {
@@ -58,77 +26,13 @@ android {
58
26
lintOptions {
59
27
abortOnError false
60
28
}
61
-
62
- libraryVariants. all { variant ->
63
- String libRootName
64
- variant. outputs. all { output ->
65
- libRootName = " ${ archivesBaseName} -${ variant.buildType.name} "
66
-
67
- output. outputFileName = " ${ libRootName} .aar"
68
- }
69
-
70
- String taskPrefix = " generate" + variant. name. capitalize()
71
- String javadocSuffix = " Javadoc"
72
- String javadocJarSuffix = " JavadocJar"
73
- String sourcesJarSuffix = " SourcesJar"
74
-
75
-
76
- task(taskPrefix + javadocSuffix, type : Javadoc ) {
77
- failOnError false
78
- source = variant. getJavaCompiler(). source
79
-
80
- title = " Button SDK :${ variant.name} "
81
- description " Generates Javadoc for ${ variant.name} ."
82
-
83
- destinationDir = new File (new File (" ${ project.getBuildDir()} /docs/javadoc/" , variant. baseName), " html" )
84
-
85
- options. links(" http://docs.oracle.com/javase/7/docs/api/" );
86
- options. linksOffline(" http://d.android.com/reference" ," ${ android.sdkDirectory} /docs/reference" );
87
-
88
- ext. androidJar = " ${ android.sdkDirectory} /platforms/${ android.compileSdkVersion} /android.jar"
89
- classpath + = files(ext. androidJar)
90
- classpath + = files(variant. javaCompile. classpath. files)
91
- classpath + = project. files(android. getBootClasspath(). join(File . pathSeparator))
92
- classpath + = configurations. compile
93
-
94
- exclude ' **/BuildConfig.java'
95
- exclude ' **/R.java'
96
- }
97
-
98
- task(taskPrefix + javadocJarSuffix, type : Jar , dependsOn : taskPrefix + javadocSuffix) {
99
- destinationDir = new File (" ${ project.getBuildDir()} /outputs/jar" )
100
- archiveName = libRootName+ " -javadoc.jar"
101
- classifier = " javadoc"
102
- extension = " jar"
103
-
104
- from tasks[taskPrefix + javadocSuffix]. destinationDir
105
- }
106
-
107
- task(taskPrefix + sourcesJarSuffix, type : Jar ) {
108
- destinationDir = new File (" ${ project.getBuildDir()} /outputs/jar" )
109
- archiveName = libRootName+ " -sources.jar"
110
- classifier = " sources"
111
- extension = " jar"
112
-
113
- from android. sourceSets. main. java. sourceFiles
114
- }
115
-
116
- artifacts {
117
- archives tasks[taskPrefix + javadocJarSuffix]
118
- archives tasks[taskPrefix + sourcesJarSuffix]
119
- }
120
- }
121
29
}
122
30
123
31
dependencies {
124
- implementation parent. ext. libAndroidSupportv7
125
32
testImplementation parent. ext. libJunit
126
33
testImplementation parent. ext. libMockito
127
34
35
+ implementation parent. ext. libAndroidSupport
36
+
128
37
api(group : ' com.yoti.mobile.android' , name : ' base-commons-ui' , version : yotiCommonUIVersion, ext : ' aar' )
129
38
}
130
-
131
- // Wrapper upload task to get correct artifacts to repos
132
- task publishDebug (dependsOn : [" publishDebugPublicationToSnapshotRepository" ], group : " publishing" );
133
- task publishRelease (dependsOn : [" publishReleasePublicationToReleaseRepository" ], group : " publishing" );
134
- task publishForSdkDebug (dependsOn : [" publishDebug" ], group : " publishing" );
0 commit comments