Skip to content

Commit f3ecdda

Browse files
Deprecated grant method in Java API. (#335)
* Deprecated grant method in Java API. * PubNub SDK v10.4.2 release. --------- Co-authored-by: PubNub Release Bot <[email protected]>
1 parent 3b7aa64 commit f3ecdda

File tree

6 files changed

+25
-7
lines changed

6 files changed

+25
-7
lines changed

.pubnub.yml

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: kotlin
2-
version: 10.4.1
2+
version: 10.4.2
33
schema: 1
44
scm: github.com/pubnub/kotlin
55
files:
6-
- build/libs/pubnub-kotlin-10.4.1-all.jar
6+
- build/libs/pubnub-kotlin-10.4.2-all.jar
77
sdks:
88
-
99
type: library
@@ -23,8 +23,8 @@ sdks:
2323
-
2424
distribution-type: library
2525
distribution-repository: maven
26-
package-name: pubnub-kotlin-10.4.1
27-
location: https://repo.maven.apache.org/maven2/com/pubnub/pubnub-kotlin/10.4.1/pubnub-kotlin-10.4.1.jar
26+
package-name: pubnub-kotlin-10.4.2
27+
location: https://repo.maven.apache.org/maven2/com/pubnub/pubnub-kotlin/10.4.2/pubnub-kotlin-10.4.2.jar
2828
supported-platforms:
2929
supported-operating-systems:
3030
Android:
@@ -121,6 +121,11 @@ sdks:
121121
license-url: https://www.apache.org/licenses/LICENSE-2.0.txt
122122
is-required: Required
123123
changelog:
124+
- date: 2025-02-25
125+
version: v10.4.2
126+
changes:
127+
- type: bug
128+
text: "Added deprecation warning to grant methods."
124129
- date: 2025-01-24
125130
version: v10.4.1
126131
changes:

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## v10.4.2
2+
February 25 2025
3+
4+
#### Fixed
5+
- Added deprecation warning to grant methods.
6+
17
## v10.4.1
28
January 24 2025
39

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ You will need the publish and subscribe keys to authenticate your app. Get your
2020
<dependency>
2121
<groupId>com.pubnub</groupId>
2222
<artifactId>pubnub-kotlin</artifactId>
23-
<version>10.4.1</version>
23+
<version>10.4.2</version>
2424
</dependency>
2525
```
2626

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ RELEASE_SIGNING_ENABLED=true
1818
SONATYPE_HOST=DEFAULT
1919
SONATYPE_AUTOMATIC_RELEASE=false
2020
GROUP=com.pubnub
21-
VERSION_NAME=10.4.1
21+
VERSION_NAME=10.4.2
2222
POM_PACKAGING=jar
2323

2424
POM_NAME=PubNub SDK

pubnub-gson/pubnub-gson-api/src/main/java/com/pubnub/api/java/PubNub.kt

+7
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,13 @@ interface PubNub : EventEmitter, StatusEmitter {
257257
* - Channel level privileges are based on a combination of `subscribeKey` and `channel` name.
258258
* - User level privileges are based on the combination of `subscribeKey`, `channel`, and `auth_key`.
259259
*/
260+
@Deprecated(
261+
level = DeprecationLevel.WARNING,
262+
message = "This function is deprecated. Use the grantToken(ttl)",
263+
replaceWith = ReplaceWith(
264+
"grantToken(ttl)"
265+
)
266+
)
260267
fun grant(): Grant
261268

262269
/**

pubnub-kotlin/pubnub-kotlin-impl/src/test/kotlin/com/pubnub/api/legacy/PubNubImplTest.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class PubNubImplTest : BaseTest() {
5656
fun getVersionAndTimeStamp() {
5757
val version = PubNubImpl.SDK_VERSION
5858
val timeStamp = PubNubImpl.timestamp()
59-
assertEquals("10.4.1", version)
59+
assertEquals("10.4.2", version)
6060
assertTrue(timeStamp > 0)
6161
}
6262

0 commit comments

Comments
 (0)