Skip to content

Commit 6a562b9

Browse files
authored
[PR-19613] Migrate to AndroidX and actualise Facebook SDK (#10)
1 parent 6ebc867 commit 6a562b9

25 files changed

+104
-131
lines changed

.circleci/config.yml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,30 @@
1-
version: 2
1+
version: 2.1
22
jobs:
33
build:
44
docker:
5-
- image: circleci/android:api-27-alpha
5+
- auth:
6+
username: $DOCKERHUB_USERNAME
7+
password: $DOCKERHUB_ACCESS_TOKEN
8+
image: cimg/android:2023.04
69
environment:
10+
JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
711
JVM_OPTS: -Xmx3200m
812

9-
working_directory: ~/android-sdk
10-
1113
steps:
1214
- checkout
1315
- run:
14-
name: Create configuration files
15-
command: |
16-
touch api_keys.properties
17-
cat > keystore.properties << EOL
18-
keyAlias = circleci
19-
keyPassword = circleci
20-
storeFile = ./../keystore.jks
21-
storePassword = circleci
22-
EOL
16+
name: Copy configuration files
17+
command: cp .circleci/config/* .
2318

2419
- restore_cache:
25-
key: v1-dependencies-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
20+
key: v2-dependencies-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
2621
- run:
2722
name: Download dependencies
2823
command: ./gradlew androidDependencies
2924
- save_cache:
3025
paths:
3126
- ~/.gradle
32-
key: v1-dependencies-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
27+
key: v2-dependencies-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
3328

3429
- run:
3530
name: Run tests
@@ -45,3 +40,10 @@ jobs:
4540
path: ~/junit
4641
- store_artifacts:
4742
path: ~/junit
43+
44+
workflows:
45+
workflow:
46+
jobs:
47+
- build:
48+
context:
49+
- org-global
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
keyAlias = circleci
2+
keyPassword = circleci
3+
storeFile = ./../keystore.jks
4+
storePassword = circleci

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ captures/
4242
*.jks
4343

4444
# Keys and passwords
45-
keystore.properties
45+
/keystore.properties

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ allprojects {
2424

2525
```gradle
2626
dependencies {
27-
implementation 'com.github.talkable:android-sdk:0.5.11'
27+
implementation 'com.github.talkable:android-sdk:0.5.12'
2828
}
2929
```
3030

app/build.gradle

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ android {
1313
storePassword keystoreProperties['storePassword']
1414
}
1515
}
16-
compileSdkVersion 27
16+
compileSdkVersion 31
1717
defaultConfig {
1818
applicationId "com.talkable.demo"
1919
minSdkVersion 16
20-
targetSdkVersion 27
21-
versionCode 33
22-
versionName "0.5.2"
20+
targetSdkVersion 31
21+
versionCode 34
22+
versionName "0.5.3"
2323
}
2424
buildTypes {
2525
release {
@@ -28,12 +28,16 @@ android {
2828
signingConfig signingConfigs.config
2929
}
3030
}
31+
compileOptions {
32+
sourceCompatibility JavaVersion.VERSION_1_8
33+
targetCompatibility JavaVersion.VERSION_1_8
34+
}
3135
}
3236

3337
dependencies {
3438
implementation fileTree(include: ['*.jar'], dir: 'libs')
3539
implementation project(path: ':sdk')
36-
implementation 'com.android.support:design:27.1.1'
37-
implementation 'com.android.support:support-v4:27.1.1'
40+
implementation 'com.google.android.material:material:1.0.0'
41+
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
3842
testImplementation 'junit:junit:4.12'
3943
}

app/src/main/AndroidManifest.xml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
package="com.talkable.demo">
44

55
<uses-permission android:name="android.permission.READ_CONTACTS" />
6+
<uses-permission android:name="android.permission.INTERNET"/>
67

78
<application
89
android:allowBackup="true"
@@ -13,7 +14,8 @@
1314
android:name=".DemoApp">
1415
<activity
1516
android:name="com.talkable.demo.MainActivity"
16-
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation">
17+
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
18+
android:exported="true">
1719
<intent-filter>
1820
<action android:name="android.intent.action.MAIN" />
1921

@@ -43,8 +45,9 @@
4345
<!-- Facebook -->
4446

4547
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>
48+
<meta-data android:name="com.facebook.sdk.ClientToken" android:value="@string/facebook_client_token"/>
4649

47-
<provider android:authorities="com.facebook.app.FacebookContentProvider549932915208564"
50+
<provider android:authorities="com.facebook.app.FacebookContentProvider784708545842451"
4851
android:name="com.facebook.FacebookContentProvider"
4952
android:exported="true"/>
5053

app/src/main/res/layout/activity_main.xml

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
android:layout_height="wrap_content"
2121
android:orientation="vertical">
2222

23-
<android.support.design.widget.TextInputLayout
23+
24+
<com.google.android.material.textfield.TextInputLayout
2425
android:id="@+id/emailTextLayout"
2526
android:layout_width="match_parent"
2627
android:layout_height="wrap_content"
@@ -29,15 +30,15 @@
2930
android:layout_alignParentTop="true"
3031
android:hint="@string/emailTextLabel">
3132

32-
<android.support.design.widget.TextInputEditText
33+
<com.google.android.material.textfield.TextInputEditText
3334
android:id="@+id/emailText"
3435
android:layout_width="match_parent"
3536
android:layout_height="wrap_content"
3637
android:inputType="textEmailAddress"
3738
android:text="@string/emailTextDefault" />
38-
</android.support.design.widget.TextInputLayout>
39+
</com.google.android.material.textfield.TextInputLayout>
3940

40-
<android.support.design.widget.TextInputLayout
41+
<com.google.android.material.textfield.TextInputLayout
4142
android:id="@+id/orderNumberTextLayout"
4243
android:layout_width="match_parent"
4344
android:layout_height="wrap_content"
@@ -46,15 +47,15 @@
4647
android:layout_below="@+id/emailTextLayout"
4748
android:hint="@string/orderNumberTextLabel">
4849

49-
<android.support.design.widget.TextInputEditText
50+
<com.google.android.material.textfield.TextInputEditText
5051
android:id="@+id/orderNumberText"
5152
android:layout_width="match_parent"
5253
android:layout_height="wrap_content"
5354
android:inputType="number"
5455
android:text="@string/orderNumberTextDefault" />
55-
</android.support.design.widget.TextInputLayout>
56+
</com.google.android.material.textfield.TextInputLayout>
5657

57-
<android.support.design.widget.TextInputLayout
58+
<com.google.android.material.textfield.TextInputLayout
5859
android:id="@+id/couponTextLayout"
5960
android:layout_width="match_parent"
6061
android:layout_height="wrap_content"
@@ -63,14 +64,14 @@
6364
android:layout_below="@+id/orderNumberTextLayout"
6465
android:hint="@string/couponTextLabel">
6566

66-
<android.support.design.widget.TextInputEditText
67+
<com.google.android.material.textfield.TextInputEditText
6768
android:id="@+id/couponText"
6869
android:layout_width="match_parent"
6970
android:layout_height="wrap_content"
7071
android:text="@string/couponTextDefault" />
71-
</android.support.design.widget.TextInputLayout>
72+
</com.google.android.material.textfield.TextInputLayout>
7273

73-
<android.support.design.widget.TextInputLayout
74+
<com.google.android.material.textfield.TextInputLayout
7475
android:id="@+id/subtotalTextLayout"
7576
android:layout_width="match_parent"
7677
android:layout_height="wrap_content"
@@ -79,15 +80,15 @@
7980
android:layout_below="@+id/couponTextLayout"
8081
android:hint="@string/subtotalTextLabel">
8182

82-
<android.support.design.widget.TextInputEditText
83+
<com.google.android.material.textfield.TextInputEditText
8384
android:id="@+id/subtotalText"
8485
android:layout_width="match_parent"
8586
android:layout_height="wrap_content"
8687
android:inputType="numberDecimal"
8788
android:text="@string/subtotalTextDefault" />
88-
</android.support.design.widget.TextInputLayout>
89+
</com.google.android.material.textfield.TextInputLayout>
8990

90-
<android.support.design.widget.TextInputLayout
91+
<com.google.android.material.textfield.TextInputLayout
9192
android:id="@+id/eventCategoryTextLayout"
9293
android:layout_width="match_parent"
9394
android:layout_height="wrap_content"
@@ -96,14 +97,14 @@
9697
android:layout_below="@+id/subtotalTextLayout"
9798
android:hint="@string/eventCategoryTextLabel">
9899

99-
<android.support.design.widget.TextInputEditText
100+
<com.google.android.material.textfield.TextInputEditText
100101
android:id="@+id/eventCategoryText"
101102
android:layout_width="match_parent"
102103
android:layout_height="wrap_content"
103104
android:text="@string/eventCategoryTextDefault" />
104-
</android.support.design.widget.TextInputLayout>
105+
</com.google.android.material.textfield.TextInputLayout>
105106

106-
<android.support.design.widget.TextInputLayout
107+
<com.google.android.material.textfield.TextInputLayout
107108
android:id="@+id/webUUIDTextLayout"
108109
android:layout_width="match_parent"
109110
android:layout_height="wrap_content"
@@ -112,14 +113,14 @@
112113
android:layout_below="@+id/eventCategoryTextLayout"
113114
android:hint="@string/webUUIDTextLabel">
114115

115-
<android.support.design.widget.TextInputEditText
116+
<com.google.android.material.textfield.TextInputEditText
116117
android:id="@+id/webUUIDText"
117118
android:layout_width="match_parent"
118119
android:layout_height="wrap_content"
119120
android:text="" />
120-
</android.support.design.widget.TextInputLayout>
121+
</com.google.android.material.textfield.TextInputLayout>
121122

122-
<android.support.design.widget.TextInputLayout
123+
<com.google.android.material.textfield.TextInputLayout
123124
android:id="@+id/offerIDTextLayout"
124125
android:layout_width="match_parent"
125126
android:layout_height="wrap_content"
@@ -128,12 +129,12 @@
128129
android:layout_below="@+id/webUUIDTextLayout"
129130
android:hint="@string/offerIDTextLabel">
130131

131-
<android.support.design.widget.TextInputEditText
132+
<com.google.android.material.textfield.TextInputEditText
132133
android:id="@+id/offerIDText"
133134
android:layout_width="match_parent"
134135
android:layout_height="wrap_content"
135136
android:text="" />
136-
</android.support.design.widget.TextInputLayout>
137+
</com.google.android.material.textfield.TextInputLayout>
137138

138139

139140
<Button

app/src/main/res/values/strings.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
<string name="affiliateMemberViaApiBtnLabel">Affiliate Member via API</string>
1717
<string name="deepLinkingBtnLabel">Handle Deep Linking Params</string>
1818

19-
<string name="facebook_app_id">549932915208564</string>
19+
<string name="facebook_app_id">784708545842451</string>
20+
<string name="facebook_client_token">1898aa5e79cdc62cf0664fad34fe0e74</string>
2021
<string name="couponTextDefault">TKBL_COUPON</string>
2122
<string name="orderNumberTextDefault">12345</string>
2223
<string name="emailTextDefault">user@example.com</string>

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
google()
77
}
88
dependencies {
9-
classpath 'com.android.tools.build:gradle:3.4.2'
9+
classpath 'com.android.tools.build:gradle:3.4.3'
1010
classpath 'de.mobilej.unmock:UnMockPlugin:0.6.4'
1111
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
1212

0 commit comments

Comments
 (0)