Skip to content

Commit ac08d8c

Browse files
committed
Merge branch 'develop'
Release 1.4.0
2 parents 01b6d3c + cadf6d3 commit ac08d8c

File tree

748 files changed

+6060
-2652
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

748 files changed

+6060
-2652
lines changed

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
insert_final_newline = true
9+
max_line_length = 120
10+
tab_width = 4
11+
12+
# noinspection EditorConfigKeyCorrectness
13+
# Disable Ktlint import ordering temporarily
14+
# https://github.com/pinterest/ktlint/issues/527
15+
[*.{kt, kts}]
16+
disabled_rules = import-ordering

CHANGELOG.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
# 1.4.0
2+
3+
Starting from this version, the library is compatible only with kotlin version `1.3.70` or higher,
4+
this due the [breaking changes](https://github.com/Kotlin/kotlinx.serialization/blob/master/CHANGELOG.md#0200--2020-03-04) of kotlin serialization library.
5+
6+
### Added
7+
- Recommendation client (#148)
8+
- Analytics regions (#170)
9+
- Natural languages parameter to search query (#173)
10+
- Logs inner queries (#174)
11+
- Personalization as part of the `RankingInfo` of the `ResponseSearch` (#185)
12+
- Unquoted variant of legacy `FilterConverter` (#188)
13+
- Accept `enablePersonalization` boolean as a valid setting parameter (#183)
14+
- `appliedRules` as part of the `ResponseSearch` (#184)
15+
16+
### Changed
17+
- Updated Kotlin to `1.3.72`
18+
- Updated Ktor client to `1.3.2`
19+
- Updated Kotlin serialization `0.20.0`
20+
- Split `Promotion` into two variants: `Single` and `Multiple` (#191)
21+
22+
### Fixed
23+
- Ensure correctly typing of API key's `restrictIndices` and `restrictSources` parameters (#167, #168)
24+
- Search response serialization after enabling personalization (#185)
25+
- Insights event serialization causing errors in old Android JVMs (#189)
26+
- Omit all line terminators in the base64 encoder (instantsearch-android#191)
27+
28+
### Removed
29+
- Remove deprecated personalization endpoint in favor of the recommendation client (#185)
30+
131
# 1.3.1
232

333
- Updated Ktor to `1.3.0`
@@ -65,4 +95,4 @@
6595
- It is now possible to configure `HttpClientConfig` in `Configuration`
6696
- Added `ClientPlaces` to access Algolia Places endpoints. See this [file](docs/Places.md) for getting starting with Places.
6797
- `QueryLanguage` is renamed to `Language`
68-
- Fixed a bug in `browseAllABTests` methods
98+
- Fixed a bug in `browseAllABTests` methods

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @q-litzler @PLNech
1+
* @spinach @Aallam

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
## ✨ Features
2323

24-
- The Kotlin client is compatible with Kotlin `1.3.41` and higher.
24+
- The Kotlin client is compatible with Kotlin `1.3.70` and higher.
2525
- It is compatible with Kotlin project on the JVM, such as backend and Android applications.
2626
- It relies on the open source Kotlin libraries for seamless integration into Kotlin projects:
2727
- [Kotlin multiplatform](https://kotlinlang.org/docs/reference/multiplatform.html).
@@ -41,7 +41,11 @@ Install the Kotlin client by adding the following dependency to your `gradle.bui
4141
}
4242
4343
dependencies {
44+
// Search API Client
4445
implementation "com.algolia:algoliasearch-client-kotlin-jvm:$kotlin_client_version"
46+
// alternately - for android, use the following
47+
implementation "com.algolia:algoliasearch-client-kotlin-android:$kotlin_client_version"
48+
4549
// Choose one of the following http client
4650
implementation "io.ktor:ktor-client-apache:$ktor_version"
4751
implementation "io.ktor:ktor-client-okhttp:$ktor_version"
@@ -53,6 +57,8 @@ Install the Kotlin client by adding the following dependency to your `gradle.bui
5357

5458
For full documentation, visit the **[Algolia Kotlin API Client](https://www.algolia.com/doc/api-client/getting-started/install/kotlin/)**.
5559

60+
⚠️ Important: starting from version `1.4.0` the library is compatible only with kotlin version `1.3.70` or higher; for previous versions of kotlin, please use version `1.3.1` of the library.
61+
5662
### Coroutines
5763

5864
All methods performing HTTP calls in the Kotlin client are [suspending functions](https://kotlinlang.org/docs/reference/coroutines/composing-suspending-functions.html#composing-suspending-functions).

SECURITY.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## Reporting a Vulnerability
2+
3+
To report a security vulnerability, please use the [Algolia security email]([email protected]). Algolia will coordinate the fix and disclosure.

build.gradle.kts

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,51 @@
11
import com.android.build.gradle.LibraryExtension
2+
import com.diffplug.gradle.spotless.SpotlessExtension
23
import com.jfrog.bintray.gradle.tasks.BintrayUploadTask
34
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
45
import java.net.URI
56

67
buildscript {
78
repositories {
9+
mavenCentral()
810
google()
911
}
1012
dependencies {
11-
classpath("com.android.tools.build:gradle:3.5.2")
13+
classpath(plugin.Android())
14+
classpath(plugin.Spotless())
1215
}
1316
}
1417

1518
plugins {
16-
id("kotlin-multiplatform") version "1.3.60"
17-
id("kotlinx-serialization") version "1.3.60"
19+
id("kotlin-multiplatform") version "1.3.72"
20+
id("kotlinx-serialization") version "1.3.72"
1821
id("maven-publish")
1922
id("com.jfrog.bintray") version "1.8.4"
2023
id("com.github.kukuhyoniatmoko.buildconfigkotlin") version "1.0.5"
2124
}
2225

2326
apply(plugin = "com.android.library")
27+
apply(plugin = "com.diffplug.gradle.spotless")
2428

2529
repositories {
2630
jcenter()
2731
google()
2832
mavenCentral()
2933
maven { url = URI("https://dl.bintray.com/kotlin/ktor") }
3034
maven { url = URI("https://kotlin.bintray.com/kotlinx") }
35+
maven { url = URI("https://oss.sonatype.org/content/repositories/snapshots") }
3136
}
3237

3338
version = Library.version
3439
group = Library.group
3540

41+
allprojects {
42+
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>> {
43+
kotlinOptions {
44+
freeCompilerArgs = listOfNotNull("-Xopt-in=kotlin.RequiresOptIn")
45+
}
46+
}
47+
}
48+
3649
extensions.getByType(LibraryExtension::class.java).apply {
3750
compileSdkVersion(29)
3851

@@ -211,7 +224,7 @@ bintray {
211224
repo = "maven"
212225
name = Library.artifact
213226
websiteUrl = "https://www.algolia.com/"
214-
issueTrackerUrl = "https://github.com/algolia/algoliasearch-client-kotlin/issues"
227+
issueTrackerUrl = "https://github.com/algolia/algoliasearch-client-kotlin/issues"
215228
setLicenses("MIT")
216229
setLabels("Kotlin", "Algolia")
217230
vcsUrl = "https://github.com/algolia/algoliasearch-client-kotlin.git"
@@ -235,4 +248,17 @@ tasks {
235248

236249
tasks.withType<Test> {
237250
maxParallelForks = Runtime.getRuntime().availableProcessors().minus(1).coerceAtLeast(1)
238-
}
251+
}
252+
253+
configure<SpotlessExtension> {
254+
kotlin {
255+
target("**/*.kt")
256+
ktlint("0.36.0").userData(mapOf(
257+
// Disable Ktlint import ordering temporarily.
258+
// https://github.com/pinterest/ktlint/issues/527
259+
"disabled_rules" to "import-ordering"
260+
))
261+
trimTrailingWhitespace()
262+
endWithNewline()
263+
}
264+
}

buildSrc/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ plugins {
44

55
repositories {
66
jcenter()
7-
}
7+
}

buildSrc/src/main/kotlin/AndroidTestExtRunner.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ object AndroidTestExtRunner : Dependency {
33
override val group = "androidx.test.ext"
44
override val artifact = "junit"
55
override val version = "1.1.1"
6-
}
6+
}

buildSrc/src/main/kotlin/AndroidTestRunner.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ object AndroidTestRunner : Dependency {
33
override val group = "androidx.test"
44
override val artifact = "runner"
55
override val version = "1.2.0"
6-
}
6+
}

buildSrc/src/main/kotlin/Dependency.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ interface Dependency {
99

1010
return "$group:$artifact$optionalModule:$version"
1111
}
12-
}
12+
}

0 commit comments

Comments
 (0)