Skip to content

Commit dffa7ce

Browse files
Merge pull request #610 from appwrite/feat-android-updates
2 parents 7e2456a + c9ec0bd commit dffa7ce

File tree

10 files changed

+51
-51
lines changed

10 files changed

+51
-51
lines changed

example.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function getSSLPage($url) {
4141
// $platform = 'console';
4242
// $platform = 'server';
4343

44-
$spec = getSSLPage("https://raw.githubusercontent.com/appwrite/appwrite/master/app/config/specs/swagger2-latest-${platform}.json");
44+
$spec = getSSLPage("https://raw.githubusercontent.com/appwrite/appwrite/master/app/config/specs/swagger2-latest-{$platform}.json");
4545

4646
if(empty($spec)) {
4747
throw new Exception('Failed to fetch spec from Appwrite server');
@@ -68,7 +68,7 @@ function getSSLPage($url) {
6868
->setTwitter('appwrite_io')
6969
->setDiscord('564160730845151244', 'https://appwrite.io/discord')
7070
->setDefaultHeaders([
71-
'X-Appwrite-Response-Format' => '0.7.0',
71+
'X-Appwrite-Response-Format' => '1.2.0',
7272
])
7373
;
7474

@@ -93,7 +93,7 @@ function getSSLPage($url) {
9393
->setTwitter('appwrite_io')
9494
->setDiscord('564160730845151244', 'https://appwrite.io/discord')
9595
->setDefaultHeaders([
96-
'X-Appwrite-Response-Format' => '0.7.0',
96+
'X-Appwrite-Response-Format' => '1.2.0',
9797
])
9898
;
9999

@@ -117,7 +117,7 @@ function getSSLPage($url) {
117117
->setTwitter('appwrite_io')
118118
->setDiscord('564160730845151244', 'https://appwrite.io/discord')
119119
->setDefaultHeaders([
120-
'X-Appwrite-Response-Format' => '0.7.0',
120+
'X-Appwrite-Response-Format' => '1.2.0',
121121
])
122122
;
123123

@@ -140,7 +140,7 @@ function getSSLPage($url) {
140140
->setTwitter('appwrite_io')
141141
->setDiscord('564160730845151244', 'https://appwrite.io/discord')
142142
->setDefaultHeaders([
143-
'X-Appwrite-Response-Format' => '0.7.0',
143+
'X-Appwrite-Response-Format' => '1.2.0',
144144
])
145145
;
146146

@@ -208,7 +208,7 @@ function getSSLPage($url) {
208208
->setTwitter('appwrite_io')
209209
->setDiscord('564160730845151244', 'https://appwrite.io/discord')
210210
->setDefaultHeaders([
211-
'X-Appwrite-Response-Format' => '0.7.0',
211+
'X-Appwrite-Response-Format' => '1.2.0',
212212
])
213213
;
214214

@@ -231,7 +231,7 @@ function getSSLPage($url) {
231231
->setTwitter('appwrite_io')
232232
->setDiscord('564160730845151244', 'https://appwrite.io/discord')
233233
->setDefaultHeaders([
234-
'X-Appwrite-Response-Format' => '0.7.0',
234+
'X-Appwrite-Response-Format' => '1.2.0',
235235
])
236236
;
237237

@@ -259,7 +259,7 @@ function getSSLPage($url) {
259259
->setTwitter('appwrite_io')
260260
->setDiscord('564160730845151244', 'https://appwrite.io/discord')
261261
->setDefaultHeaders([
262-
'X-Appwrite-Response-Format' => '0.7.0',
262+
'X-Appwrite-Response-Format' => '1.2.0',
263263
])
264264
;
265265

@@ -286,7 +286,7 @@ function getSSLPage($url) {
286286
->setTwitter('appwrite_io')
287287
->setDiscord('564160730845151244', 'https://appwrite.io/discord')
288288
->setDefaultHeaders([
289-
'X-Appwrite-Response-Format' => '0.7.0',
289+
'X-Appwrite-Response-Format' => '1.2.0',
290290
])
291291
;
292292

@@ -311,7 +311,7 @@ function getSSLPage($url) {
311311
->setTwitter('appwrite_io')
312312
->setDiscord('564160730845151244', 'https://appwrite.io/discord')
313313
->setDefaultHeaders([
314-
'X-Appwrite-Response-Format' => '0.7.0',
314+
'X-Appwrite-Response-Format' => '1.2.0',
315315
])
316316
;
317317

@@ -336,7 +336,7 @@ function getSSLPage($url) {
336336
->setTwitter('appwrite_io')
337337
->setDiscord('564160730845151244', 'https://appwrite.io/discord')
338338
->setDefaultHeaders([
339-
'X-Appwrite-Response-Format' => '0.7.0',
339+
'X-Appwrite-Response-Format' => '1.2.0',
340340
])
341341
;
342342

@@ -360,7 +360,7 @@ function getSSLPage($url) {
360360
->setTwitter('appwrite_io')
361361
->setDiscord('564160730845151244', 'https://appwrite.io/discord')
362362
->setDefaultHeaders([
363-
'X-Appwrite-Response-Format' => '0.7.0',
363+
'X-Appwrite-Response-Format' => '1.2.0',
364364
])
365365
;
366366

@@ -384,7 +384,7 @@ function getSSLPage($url) {
384384
->setTwitter('appwrite_io')
385385
->setDiscord('564160730845151244', 'https://appwrite.io/discord')
386386
->setDefaultHeaders([
387-
'X-Appwrite-Response-Format' => '0.7.0',
387+
'X-Appwrite-Response-Format' => '1.2.0',
388388
])
389389
;
390390

templates/android/build.gradle.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apply plugin: 'io.github.gradle-nexus.publish-plugin'
22

33
// Top-level build file where you can add configuration options common to all sub-projects/modules.
44
buildscript {
5-
ext.kotlin_version = "1.7.10"
5+
ext.kotlin_version = "1.8.0"
66
version System.getenv("SDK_VERSION")
77
repositories {
88
maven { url "https://plugins.gradle.org/m2/" }

templates/android/example-java/build.gradle.twig

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ plugins {
33
}
44

55
android {
6-
compileSdkVersion 31
6+
compileSdkVersion 33
77

88
defaultConfig {
99
applicationId "{{ sdk.namespace | caseDot }}.example_java"
1010
minSdkVersion 23
11-
targetSdkVersion 31
11+
targetSdkVersion 33
1212
versionCode 1
1313
versionName "1.0"
1414

@@ -30,10 +30,10 @@ android {
3030
dependencies {
3131
implementation project(path: ':library')
3232

33-
implementation 'androidx.appcompat:appcompat:1.3.0'
34-
implementation 'com.google.android.material:material:1.3.0'
35-
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
36-
testImplementation 'junit:junit:4.+'
37-
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
38-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
33+
implementation 'androidx.appcompat:appcompat:1.6.0'
34+
implementation 'com.google.android.material:material:1.8.0'
35+
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
36+
testImplementation 'junit:junit:4.13.2'
37+
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
38+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
3939
}

templates/android/example/build.gradle.twig

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ plugins {
44
}
55

66
android {
7-
compileSdkVersion 31
7+
compileSdkVersion 33
88

99
defaultConfig {
1010
applicationId "{{ sdk.namespace | caseDot }}.android"
1111
minSdkVersion 21
12-
targetSdkVersion 31
12+
targetSdkVersion 33
1313
versionCode 1
1414
versionName "1.0"
1515

@@ -39,20 +39,20 @@ dependencies {
3939
implementation project(path: ':library')
4040

4141
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
42-
implementation 'androidx.core:core-ktx:1.6.0'
43-
implementation 'androidx.appcompat:appcompat:1.3.1'
44-
implementation 'com.google.android.material:material:1.4.0'
45-
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
46-
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
47-
implementation "androidx.fragment:fragment-ktx:1.3.6"
48-
implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
49-
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
50-
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
51-
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
52-
implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
42+
implementation 'androidx.core:core-ktx:1.9.0'
43+
implementation 'androidx.appcompat:appcompat:1.6.0'
44+
implementation 'com.google.android.material:material:1.8.0'
45+
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
46+
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.3'
47+
implementation "androidx.fragment:fragment-ktx:1.5.5"
48+
implementation 'androidx.navigation:navigation-ui-ktx:2.5.3'
49+
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.5.1'
50+
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
51+
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.3'
52+
implementation 'androidx.navigation:navigation-ui-ktx:2.5.3'
5353
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2"
54-
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2"
55-
testImplementation 'junit:junit:4.+'
56-
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
57-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
54+
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1"
55+
testImplementation 'junit:junit:4.13.2'
56+
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
57+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
5858
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Tue Jun 01 15:55:54 IST 2021
22
distributionBase=GRADLE_USER_HOME
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
44
distributionPath=wrapper/dists
55
zipStorePath=wrapper/dists
66
zipStoreBase=GRADLE_USER_HOME

templates/android/library/build.gradle.twig

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ android {
5353
}
5454

5555
dependencies {
56-
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:${org.jetbrains.kotlin.config.KotlinCompilerVersion.VERSION}")
56+
implementation("org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version")
5757
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.1")
5858
api("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1")
5959

@@ -65,14 +65,14 @@ dependencies {
6565

6666
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.5.1")
6767
implementation("androidx.lifecycle:lifecycle-common-java8:2.5.1")
68-
implementation("androidx.appcompat:appcompat:1.5.1")
69-
implementation("androidx.fragment:fragment-ktx:1.5.3")
70-
implementation("androidx.activity:activity-ktx:1.6.0")
68+
implementation("androidx.appcompat:appcompat:1.6.0")
69+
implementation("androidx.fragment:fragment-ktx:1.5.5")
70+
implementation("androidx.activity:activity-ktx:1.6.1")
7171
implementation("androidx.browser:browser:1.4.0")
7272

73-
testImplementation 'junit:junit:4.+'
74-
testImplementation "androidx.test.ext:junit-ktx:1.1.3"
75-
testImplementation "androidx.test:core-ktx:1.4.0"
73+
testImplementation 'junit:junit:4.13.2'
74+
testImplementation "androidx.test.ext:junit-ktx:1.1.5"
75+
testImplementation "androidx.test:core-ktx:1.5.0"
7676
testImplementation "org.robolectric:robolectric:4.5.1"
7777
testApi("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.1")
7878
}

templates/android/library/src/main/java/io/appwrite/services/ServiceTemplate.kt.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ class {{ service.name | caseUcfirst }} : Service {
203203
{%~ if 'multipart/form-data' in method.consumes %}
204204
onProgress: ((UploadProgress) -> Unit)? = null
205205
{%~ endif %}
206-
) = {{ method.name | caseCamel }}(
206+
): {{ method | returnType(spec, sdk.namespace | caseDot, 'Map<String, Any>') | raw }} = {{ method.name | caseCamel }}(
207207
{%~ if method.type == "webAuth" %}
208208
activity,
209209
{%~ endif %}

templates/kotlin/build.gradle.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id "org.jetbrains.kotlin.jvm" version '1.6.10'
2+
id "org.jetbrains.kotlin.jvm" version '1.8.0'
33
id "java-library"
44
id "io.github.gradle-nexus.publish-plugin" version "1.1.0"
55
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

templates/kotlin/src/main/kotlin/io/appwrite/services/ServiceTemplate.kt.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class {{ service.name | caseUcfirst }} : Service {
106106
{%~ if 'multipart/form-data' in method.consumes %}
107107
onProgress: ((UploadProgress) -> Unit)? = null
108108
{%~ endif %}
109-
) = {{ method.name | caseCamel }}(
109+
): {{ method | returnType(spec, sdk.namespace | caseDot, 'Map<String, Any>') | raw }} = {{ method.name | caseCamel }}(
110110
{%~ if method.type == "webAuth" %}
111111
activity,
112112
{%~ endif %}

0 commit comments

Comments
 (0)