Skip to content
This repository was archived by the owner on Jan 31, 2022. It is now read-only.

Commit 0e04cd7

Browse files
author
Clément Le Provost
committed
Merge branch 'v3'
2 parents 08f770e + 0503473 commit 0e04cd7

40 files changed

+5130
-4234
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ proguard/
2727
*.log
2828

2929
# Android Studio
30+
*.iml
3031
.navigation/
3132
.idea/
3233
*.iml

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ before_script:
3939
- adb shell input keyevent 82 &
4040
script:
4141
- set -o pipefail
42-
- travis_retry bash run_test.sh
42+
- bash run_test.sh

ChangeLog renamed to ChangeLog.md

Lines changed: 71 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,114 @@
1-
Changelog
2-
=========
1+
Change Log
2+
==========
33

4-
2.6.1 (2016-01-28)
5-
- Add snippetEllipsisText method
4+
## 3.0 (FIXME)
5+
6+
This major version brings new features as well as bug fixes. In addition, a lot of refactoring has been performed
7+
to achieve better maintainability and to align the Android client with the other Algolia API clients.
8+
9+
As a consequence, the public interface has changed in an incompatible way. Please refer to our
10+
[Migration guide](https://github.com/algolia/algoliasearch-client-android/wiki/Migration-guide-to-version-3.x) for
11+
detailed instructions.
12+
13+
### New features
14+
15+
- In-memory search cache: disabled by default, can be enabled per index.
16+
- Allow arbitrary query parameters to be specified: the `Query` class provides low-level, untyped accessors in addition
17+
to the higher-level, typed accessors.
18+
- Allow arbitrary HTTP headers to be specified (`Client.setHeader`)
19+
- Asynchronous requests are cancellable: asynchronous methods return a `Request` instance with a `cancel` method.
20+
- Low-level browse methods (`Index.browse` and `Index.browseFrom`)
21+
- New browse helper (`BrowseIterator`)
22+
- New method to clear an index (`Index.clearIndexAsync`)
23+
24+
### Changes
25+
26+
- Now only one type of asynchronous listener (`CompletionHandler`) with an interface containing only one method,
27+
used for both success and error cases. In addition to simplifying the code and aligning the Android client with other
28+
languages, this makes it possible to use Java 8 **lambda expressions**.
29+
- Remove operations requiring an admin API key. (The admin key should *never* be used on the client side.)
30+
- Align `Query` class parameters with the [REST API](https://www.algolia.com/doc/rest)
31+
- Improve the type safety of many `Query` parameters, especially the geo search-related parameters and the filters
32+
- Remove obsolete (and unused) `enableDsn` and `dsnHost` initialization parameters
33+
- Remove accessors to deprecated HTTP headers
34+
- Space character is now URL-encoded as `%20` instead of `+`
35+
- Better naming convention:
36+
- Rename `APIClient` class to `Client`
37+
- Rename `*ASync` to `*Async`
38+
- Remove prefix on enum values
39+
40+
### Fixes
41+
42+
- Search queries now use POST instead of GET, working around any potential hard-coded limit to the URL string.
43+
- Delete by query uses browse instead of search, for both better performance and to work around any index settings
44+
(like `distinct`) that would silently prevent the query from selecting all objects.
45+
- More consistent error handling
46+
- Fix retry logic in case of host failure
47+
- Alleviate critical section on internal request methods
48+
49+
### Misc. improvements
50+
51+
- Use `@NonNull` annotations to document mandatory parameters and return values
52+
- Asynchronous methods no longer throw (declared) exceptions
53+
- Update documentation (a lot!)
54+
- Add test cases
55+
56+
## 2.6.1 (2016-01-28)
57+
58+
- Add `snippetEllipsisText` query parameter
59+
60+
## 2.6.0 (2016-01-07)
661

7-
2.6.0 (2016-01-07)
862
- Add disjunctive faceting method
963

10-
2.5.1 (2016-01-07)
64+
## 2.5.1 (2016-01-07)
65+
1166
- Fixed method used to generate the query parameters of multiqueries
1267

13-
2.5.0 (2015-12-01)
68+
## 2.5.0 (2015-12-01)
69+
1470
- Added support of Android SDK >= 14
1571

16-
2.4.0 (2015-10-12)
72+
## 2.4.0 (2015-10-12)
1773

1874
- Added remove stop words query parameter
1975
- Added support of similar queries
2076

21-
2.3.0 (2015-10-01)
77+
## 2.3.0 (2015-10-01)
2278

2379
- Added support of multiple bounding box for geo-search
2480
- Added support of polygon for geo-search
2581
- Added support of automatic radius computation for geo-search
2682
- Added support of disableTypoToleranceOnAttributes
2783

28-
2.2.0 (2015-09-29)
84+
## 2.2.0 (2015-09-29)
2985

3086
- Ensure all requests accept the GZIP encoding to reduce the JSON payloads size
3187

32-
2.1.0 (2015-08-24)
88+
## 2.1.0 (2015-08-24)
3389

3490
- Publish on MavenCentral
3591

36-
2.0.0 (2015-08-01)
92+
## 2.0.0 (2015-08-01)
3793

3894
- Rewrite the API Client as a Android package
3995
- Split the async listeners/interfaces
4096

4197
1.6.7 (2015-07-14)
4298
------------------
4399

44-
- Added support of grouping (distinct=3 to keep the 3 best hits for a distinct key)
100+
- Added support of grouping (`distinct=3` to keep the 3 best hits for a distinct key)
45101

46102
1.6.6 (2015-06-05)
47103
--------------------
48104

49-
- add new parameter on the Query: setMinProximity & setHighlightingTags
105+
- add new parameter on the Query: `setMinProximity` & `setHighlightingTags`
50106
- new cursor-based browse implementation
51107

52108
1.6.5 (2015-05-26)
53109
------------------
54110

55-
- Fix thread concurrency for method _request
111+
- Fix thread concurrency for method `_request`
56112

57113
1.6.4 (2015-05-04)
58114
------------------

algoliasearch-client-android.iml

Lines changed: 0 additions & 19 deletions
This file was deleted.

algoliasearch/android-release-jar.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ uploadArchives {
9898
}
9999
}
100100
}
101-
101+
102102
pom.withXml {
103103
asNode().dependencies.dependency.findAll { xmlDep ->
104104
// mark optional dependencies
@@ -113,12 +113,12 @@ uploadArchives {
113113
}
114114
}
115115
}
116-
116+
117117
// Add other pom properties here if you want (developer details / licenses)
118118
repository(url: "file://${localReleaseDest}")
119119

120120
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
121-
authentication(userName: project.hasProperty('ossrhUsername') ? project['ossrhUsername'] : 'FIXME', password: project.hasProperty('ossrhPassword') ? project['ossrhPassword'] : 'FIXME')
121+
authentication(userName: project.hasProperty('nexusUsername') ? project['nexusUsername'] : 'FIXME', password: project.hasProperty('nexusPassword') ? project['nexusPassword'] : 'FIXME')
122122
}
123123
}
124124
}

algoliasearch/build.gradle

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
apply plugin: 'com.android.library'
2525

2626
ext {
27-
PUBLISH_GROUP_ID = 'com.algolia'
27+
PUBLISH_GROUP_ID = rootProject.properties["PUBLISH_GROUP_ID"] ?: ""
2828
PUBLISH_ARTIFACT_ID = 'algoliasearch-android'
2929
PUBLISH_VERSION = '2.8.0'
3030
}
@@ -44,15 +44,22 @@ android {
4444
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
4545
}
4646
}
47+
defaultPublishConfig "onlineRelease"
48+
publishNonDefault true
4749
productFlavors {
50+
// The regular online API client.
51+
online
52+
// The offline-enabled API client, adding offline features on top of the online client.
53+
// NOTE: Requires Algolia's SDK.
54+
offline
4855
}
4956
}
5057

51-
apply from: 'android-release-jar.gradle'
52-
5358
dependencies {
5459
compile 'com.android.support:appcompat-v7:21.0.3'
5560
compile fileTree(include: ['*.jar'], dir: 'libs')
61+
// TODO: Switch to published version.
62+
// offlineCompile project(path: ':algoliasearchsdk', configuration: 'debug')
5663

5764
testCompile "junit:junit:4.12"
5865
testCompile "org.assertj:assertj-core:1.7.0"

0 commit comments

Comments
 (0)