Skip to content

Commit bd06830

Browse files
authored
Merge pull request #9 from getyoti/DEP-86_UpdateAndroidXAndeDeploy
DEP-86 update android x and deploy
2 parents 5f1d92f + 677a25a commit bd06830

File tree

18 files changed

+97
-319
lines changed

18 files changed

+97
-319
lines changed

build.gradle

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22

33
buildscript {
44
repositories {
5+
mavenLocal()
56
jcenter()
67
google()
78
mavenCentral()
89
}
910
dependencies {
10-
classpath 'com.android.tools.build:gradle:3.0.1'
11-
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.11.0"
11+
classpath 'com.android.tools.build:gradle:3.5.0'
12+
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.20.0"
1213
}
1314
}
1415

@@ -17,19 +18,19 @@ apply plugin: 'io.codearte.nexus-staging'
1718

1819
allprojects {
1920
repositories {
21+
mavenLocal()
2022
mavenCentral()
2123
jcenter()
2224
google()
2325
}
2426

2527
ext {
2628
// Android config
27-
androidBuildToolsVersion = project.ext.buildToolsVersion
2829
androidMinSdkVersion = minSdkVersionVersion.toInteger()
2930
androidTargetSdkVersion = targetSdkVersion.toInteger()
3031
androidCompileSdkVersion = compileSdkVersion.toInteger()
3132

32-
libAndroidSupportv7 = "com.android.support:appcompat-v7:${supportLibraryVersion}"
33+
libAndroidSupport = "androidx.appcompat:appcompat:$supportLibraryVersion"
3334

3435
// Testing
3536
libJunit = "junit:junit:${libJunitVersion}"

gradle.properties

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -21,48 +21,45 @@
2121
#org.gradle.daemon=true
2222

2323

24-
buildToolsVersion=26.0.2
2524
minSdkVersionVersion=15
26-
targetSdkVersion=25
27-
compileSdkVersion=25
25+
targetSdkVersion=28
26+
compileSdkVersion=28
2827

2928
yotiCommonUIVersion=0.0.5
30-
supportLibraryVersion=25.3.1
29+
supportLibraryVersion=1.0.2
3130

3231
libJunitVersion=4.12
3332
libMockitoVersion=1.10.19
3433

35-
currentVersion=1.1.0
36-
currentVersionCode=000008
3734
currentAppName=Mobile Button SDK
38-
artefactName=yoti-button-sdk
39-
40-
# OSSRH repositories
41-
ossrhSnapshotRepository=https://oss.sonatype.org/content/repositories/snapshots
42-
ossrhRepository=https://oss.sonatype.org/service/local/staging/deploy/maven2/
4335

44-
# Empty sonatype username and password so we can assemble locally
45-
# To publish define these in your global gradle properties with the correct values or use -P in the command line
46-
sonatypeUsername
47-
sonatypePassword
36+
# Publication
37+
releaseRepository=https://nexus.internal.yoti.com/repository/maven-releases/
38+
repoUsername=android
39+
repoPassword=replaceMe
4840

49-
# POM configuration
41+
pomId=yoti-button-sdk
5042
pomGroup=com.yoti.mobile.android.sdk
51-
pomName=Yoti Button SDK
5243
pomPackaging=aar
53-
pomDescription=Button SDK that allws 3rd party to trigger Yoti as support app
54-
pomUrl=https://github.com/getyoti/android-sdk-button.git
44+
pomVersion=1.1.0
45+
pomDescription=Button SDK that allows 3rd party to trigger Yoti as support app
46+
currentVersionCode=000008
47+
48+
pomLicenseName=Yoti License
49+
pomLicenseUrl=https://github.com/getyoti/java/LICENSE.txt
5550

5651
pomScmUrl=scm:https://github.com/getyoti/android-sdk-button.git
5752
pomScmConnection=scm:https://github.com/getyoti/android-sdk-button.git
58-
pomScmDevConnection=https://github.com/getyoti/android-sdk-button.git
5953

60-
pomLicenseName=Yoti License
61-
pomLicenseUrl=https://github.com/getyoti/java/LICENSE.txt
54+
# Maven central specificities
55+
publishAarVersion=1.3.3
56+
publishAarMavenCentralVersion=1.1.0
6257

63-
pomDeveloperNames=Adrien Violet,Cyrille Quemin
64-
pomDeveloperIds=AdrienVioletYoti,cquemin
58+
sonatypeUsername=yoti
59+
sonatypePassword=aStrongPassword
6560

66-
#name of thask that will generate extra artifact to archives
67-
#artifactsToArchive=generateDebugJavadocJar,generateDebugSourcesJar
68-
artifactsToArchive=generateReleaseJavadocJar,generateReleaseSourcesJar
61+
signing.keyId=1A234BCD
62+
signing.password=anotherStrongPassword
63+
signing.secretKeyRingFile=/path/to/the/gpg/file.gpg
64+
android.useAndroidX=true
65+
android.enableJetifier=true

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.1-all.zip

sample-app-2/build.gradle

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 26
5-
buildToolsVersion "26.0.2"
4+
compileSdkVersion parent.ext.androidCompileSdkVersion
65

76

87
defaultConfig {
9-
applicationId "com.madmaclon.sample_app_2"
10-
minSdkVersion 16
11-
targetSdkVersion 26
8+
applicationId "com.yoti.mobile.android.button.sdk.sampleapp2"
9+
minSdkVersion parent.ext.androidMinSdkVersion
10+
targetSdkVersion parent.ext.androidTargetSdkVersion
1211
versionCode 1
1312
versionName "1.0"
1413

15-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
16-
14+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1715
}
1816

1917
buildTypes {
@@ -27,8 +25,8 @@ android {
2725

2826
dependencies {
2927
implementation fileTree(dir: 'libs', include: ['*.jar'])
30-
implementation 'com.android.support:appcompat-v7:26.1.0'
28+
implementation parent.ext.libAndroidSupport
3129
testImplementation 'junit:junit:4.12'
32-
implementation("com.yoti.mobile.android.sdk:yoti-button-sdk:0.0.6")
33-
implementation 'com.google.code.gson:gson:2.8.2'
30+
implementation("com.yoti.mobile.android.sdk:yoti-button-sdk:1.1.0")
31+
implementation 'com.google.code.gson:gson:2.8.5'
3432
}

sample-app-2/src/main/java/com/yoti/mobile/android/sampleapp2/MainActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.yoti.mobile.android.sampleapp2;
22

33
import android.content.Intent;
4-
import android.support.v7.app.AppCompatActivity;
4+
import androidx.appcompat.app.AppCompatActivity;
55
import android.os.Bundle;
66
import android.view.View;
77
import android.widget.ProgressBar;

sample-app-2/src/main/java/com/yoti/mobile/android/sampleapp2/ProfileActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import android.graphics.Bitmap;
44
import android.graphics.BitmapFactory;
5-
import android.support.v7.app.AppCompatActivity;
5+
import androidx.appcompat.app.AppCompatActivity;
66
import android.os.Bundle;
77
import android.util.Base64;
88
import android.widget.ImageView;

sample-app/build.gradle

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ apply plugin: 'com.android.application'
22

33
android {
44
compileSdkVersion parent.ext.androidCompileSdkVersion
5-
buildToolsVersion parent.ext.androidBuildToolsVersion
65

76
defaultConfig {
8-
applicationId "com.yoti.mobile.android.sdk.sampleapp"
7+
applicationId "com.yoti.mobile.android.button.sdk.sampleapp"
98
minSdkVersion parent.ext.androidMinSdkVersion
109
targetSdkVersion parent.ext.androidTargetSdkVersion
1110
versionCode 1
@@ -40,17 +39,16 @@ android {
4039
signingConfig signingConfigs.release
4140
}
4241
}
43-
buildToolsVersion '26.0.2'
4442
}
4543

4644

4745
dependencies {
48-
implementation parent.ext.libAndroidSupportv7
46+
implementation parent.ext.libAndroidSupport
4947
testImplementation 'junit:junit:4.12'
5048

5149
implementation project(path: ':yoti-sdk')
5250

5351

5452
// Use this version if you want to point at the dependency published on mavenCentral
55-
// implementation("com.yoti.mobile.android:base-commons-ui:0.0.5)
53+
//implementation("com.yoti.mobile.android.sdk:yoti-button-sdk:1.1.0")
5654
}

sample-app/src/main/java/com/yoti/mobile/android/sdk/sampleapp/MainActivity.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.yoti.mobile.android.sdk.sampleapp;
22

33
import android.content.Intent;
4-
import android.support.v7.app.AppCompatActivity;
4+
import androidx.appcompat.app.AppCompatActivity;
55
import android.os.Bundle;
66
import android.view.View;
77
import android.widget.ProgressBar;
@@ -25,9 +25,9 @@ protected void onCreate(Bundle savedInstanceState) {
2525

2626
setContentView(R.layout.activity_main);
2727

28-
mYotiSDKButton = (YotiSDKButton) findViewById(R.id.button);
29-
mProgress = (ProgressBar) findViewById(R.id.progress);
30-
mMessage = (TextView)findViewById(R.id.text);
28+
mYotiSDKButton = findViewById(R.id.button);
29+
mProgress = findViewById(R.id.progress);
30+
mMessage = findViewById(R.id.text);
3131

3232
mYotiSDKButton.setOnYotiButtonClickListener(new YotiSDKButton.OnYotiButtonClickListener() {
3333
@Override

yoti-sdk/build.gradle

Lines changed: 6 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,22 @@
11
apply plugin: 'com.android.library'
2-
apply plugin: 'maven-publish'
3-
apply from: 'publication.gradle'
42

53

6-
group = "com.yoti.mobile.android"
7-
version = currentVersion
4+
group = "$pomGroup"
5+
version = "$pomVersion"
86

97

108
android {
119
compileSdkVersion parent.ext.androidCompileSdkVersion
12-
buildToolsVersion parent.ext.androidBuildToolsVersion
1310

1411
defaultConfig {
1512

1613
minSdkVersion parent.ext.androidMinSdkVersion
1714
targetSdkVersion parent.ext.androidTargetSdkVersion
1815

1916
versionCode currentVersionCode.toInteger()
20-
versionName currentVersion
17+
versionName pomVersion
2118

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"
5220
}
5321

5422
testOptions {
@@ -58,77 +26,13 @@ android {
5826
lintOptions {
5927
abortOnError false
6028
}
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-
}
12129
}
12230

12331
dependencies {
124-
implementation parent.ext.libAndroidSupportv7
12532
testImplementation parent.ext.libJunit
12633
testImplementation parent.ext.libMockito
12734

35+
implementation parent.ext.libAndroidSupport
36+
12837
api(group: 'com.yoti.mobile.android', name: 'base-commons-ui', version: yotiCommonUIVersion, ext: 'aar')
12938
}
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

Comments
 (0)