Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
4f562cc
[Java] Disable three styling rules (#242)
arifBurakDemiray Feb 16, 2024
2111ce3
[Java] Add underscore to the numerics #Codacy (#243)
arifBurakDemiray Feb 19, 2024
5953ffb
[Java] Add underscore to the numerics 2 #Codacy (#244)
arifBurakDemiray Feb 19, 2024
812c14a
refactor: reorder field declarations to the top (#245)
arifBurakDemiray Feb 21, 2024
bb3d889
Update Device.java (#246)
arifBurakDemiray Feb 22, 2024
1348243
Update UtilsTests.java (#247)
arifBurakDemiray Feb 22, 2024
47e7a33
Update UtilsTests.java (#248)
arifBurakDemiray Feb 22, 2024
04894bf
Update dated-out authType check for SSLSecurity (#249)
arifBurakDemiray Mar 11, 2024
c6db766
feat: set id (#250)
arifBurakDemiray Apr 8, 2024
ed4a580
feat: upgrade vulnerable dependencies
arifBurakDemiray Sep 25, 2024
2a21abf
feat: added changelog
arifBurakDemiray Sep 25, 2024
be08c9c
Merge pull request #251 from Countly/upgrade_vulnarable
turtledreams Sep 25, 2024
63b7173
feat: bump json lib
arifBurakDemiray Mar 5, 2025
3771f93
Merge pull request #252 from Countly/24_1_1
turtledreams Mar 5, 2025
62d0153
feat: network headers example
arifBurakDemiray Jul 16, 2025
d2e9062
feat: network headers config entry
arifBurakDemiray Jul 16, 2025
aa326cb
feat: network headers impl
arifBurakDemiray Jul 16, 2025
5826588
feat: new minor
arifBurakDemiray Jul 16, 2025
3a661e8
Merge pull request #253 from Countly/custom_headers
turtledreams Jul 16, 2025
a053106
Dependency change
turtledreams Jul 16, 2025
89543e7
Merge pull request #254 from Countly/maven-migration
turtledreams Jul 16, 2025
01b97b0
Update CHANGELOG.md
turtledreams Jul 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .idea/modules/app-java/countly-sdk-java.app-java.main.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion .idea/modules/app-java/countly-sdk-java.app-java.test.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/modules/sdk-java/countly-sdk-java.sdk-java.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .idea/modules/sdk-java/countly-sdk-java.sdk-java.main.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions .idea/modules/sdk-java/countly-sdk-java.sdk-java.test.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## 24.1.2
* !! Major Breaking Change !! Minimum JDK support is 19 for this minor.

* Migrated from Sonatype OSSRH.
* Added a new configuration function "addCustomNetworkRequestHeaders(Map<String, String>)" to add custom request headers to each request.

## 24.1.1

* Added a new function "setID(newDeviceId)" for managing device id changes according to the device ID Type.

* Mitigated an issue where json and junit dependencies had vulnerabilities.

## 24.1.0

* !! Major breaking change !! The following method and its functionality is deprecated from the "UserEditor" interface and will not function anymore:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ private static void recordView() {
segmentation.put("segment", "Windows");
segmentation.put("start", "1");

Countly.instance().backendM().recordView(DEVICE_ID, "SampleView", segmentation, 1646640780130L);
Countly.instance().backendM().recordView(DEVICE_ID, "SampleView", segmentation, 1_646_640_780_130L);
}

private static void recordEvent() {
Expand Down Expand Up @@ -298,7 +298,7 @@ public static void main(String[] args) throws Exception {
Config config = new Config(COUNTLY_SERVER_URL, COUNTLY_APP_KEY)
.setLoggingLevel(Config.LoggingLevel.DEBUG)
.enableBackendMode()
.setRequestQueueMaxSize(10000)
.setRequestQueueMaxSize(10_000)
.setDeviceIdStrategy(Config.DeviceIdStrategy.UUID)
.setRequiresConsent(false)
.setEventQueueSizeToSend(1000);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private static void initSDK(int eventQueueSize, int requestQueueSize) {

static void performLargeRequestQueueSizeTest() {
DemoUtils.println("===== Test Started: 'Large request queue size' =====");
int requestQSize = 1000000;
int requestQSize = 1_000_000;
DemoUtils.printf("Before SDK Initialization: Total Memory = %dMb, Available RAM = %dMb %n", Device.dev.getRAMTotal(), Device.dev.getRAMAvailable());
initSDK(1, requestQSize);
DemoUtils.printf("After SDK Initialization: Total Memory = %d Mb, Available RAM= %d Mb %n", Device.dev.getRAMTotal(), Device.dev.getRAMAvailable());
Expand Down Expand Up @@ -121,7 +121,7 @@ static void performLargeEventQueueTest() {
DemoUtils.printf("After SDK Initialization: Total Memory = %d Mb, Available RAM= %d Mb %n", Device.dev.getRAMTotal(), Device.dev.getRAMAvailable());
int noOfDevices = 10;
for (int d = 0; d <= noOfDevices; ++d) {
DemoUtils.printf("Adding %d events into event Queue against deviceID = %s%n", 1_000_00, "device-id-" + d);
DemoUtils.printf("Adding %d events into event Queue against deviceID = %s%n", 100_000, "device-id-" + d);
for (int i = 1; i <= noOfEvents; ++i) {

Map<String, Object> segment = new ConcurrentHashMap<>();
Expand Down
5 changes: 5 additions & 0 deletions app-java/src/main/java/ly/count/java/demo/Example.java
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,14 @@ public static void main(String[] args) throws Exception {
}
}

Map<String, String> customNetworkRequestHeaders = new ConcurrentHashMap<>();
customNetworkRequestHeaders.put("X-Countly-Example", "true");
customNetworkRequestHeaders.put("X-Countly-Example-Version", "1.0");

Config config = new Config(COUNTLY_SERVER_URL, COUNTLY_APP_KEY, sdkStorageRootDirectory)
.setLoggingLevel(Config.LoggingLevel.DEBUG)
.setDeviceIdStrategy(Config.DeviceIdStrategy.UUID)
.addCustomNetworkRequestHeaders(customNetworkRequestHeaders)
.enableFeatures(Config.Feature.Events, Config.Feature.Sessions, Config.Feature.CrashReporting, Config.Feature.Views, Config.Feature.UserProfiles, Config.Feature.Location, Config.Feature.Feedback)
.setRequiresConsent(true)
//.enableParameterTamperingProtection("test-salt-checksum")
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ buildscript {
}
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'
classpath 'com.android.tools.build:gradle:8.1.4'
classpath 'com.github.dcendents:android-maven-plugin:1.2'
classpath 'com.google.gms:google-services:4.3.0'
classpath 'com.google.gms:google-services:4.4.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
ext.CLY_VERSION = "24.1.0"
ext.CLY_VERSION = "24.1.2"
ext.POWERMOCK_VERSION = "1.7.4"

tasks.withType(Javadoc) {
Expand Down
5 changes: 3 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# org.gradle.parallel=true

# RELEASE FIELD SECTION
VERSION_NAME=24.1.0
VERSION_NAME=24.1.2
GROUP=ly.count.sdk

POM_URL=https://github.com/Countly/countly-sdk-java
Expand All @@ -31,4 +31,5 @@ POM_LICENCE_DIST=repo
POM_DEVELOPER_NAME=Countly

# Publishing properties
SONATYPE_AUTOMATIC_RELEASE=true
SONATYPE_HOST=CENTRAL_PORTAL
RELEASE_SIGNING_ENABLED=true
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
8 changes: 7 additions & 1 deletion ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@
</properties>
</rule>
<rule ref="category/java/codestyle.xml/MDBAndSessionBeanNamingConvention" />
<!--
<rule ref="category/java/codestyle.xml/MethodArgumentCouldBeFinal" />
-->
<rule ref="category/java/codestyle.xml/NoPackage" />
<rule ref="category/java/codestyle.xml/PrematureDeclaration" />
<rule ref="category/java/codestyle.xml/RemoteInterfaceNamingConvention" />
Expand Down Expand Up @@ -284,6 +286,7 @@

<!-- Documentation rules -->
<rule ref="category/java/documentation.xml/CommentContent" />
<!--
<rule ref="category/java/documentation.xml/CommentRequired">
<properties>
<property name="methodWithOverrideCommentRequirement" value="Ignored" />
Expand All @@ -297,6 +300,7 @@
<property name="serialPersistentFieldsCommentRequired" value="Ignored" />
</properties>
</rule>
-->
<rule ref="category/java/documentation.xml/CommentSize">
<properties>
<property name="maxLines" value="10" />
Expand All @@ -319,7 +323,9 @@
<rule ref="category/java/errorprone.xml/AvoidCatchingNPE" />
<rule ref="category/java/errorprone.xml/AvoidCatchingThrowable" /><!--???-->
<rule ref="category/java/errorprone.xml/AvoidDecimalLiteralsInBigDecimalConstructor" />
<!--
<rule ref="category/java/errorprone.xml/AvoidDuplicateLiterals" />
-->
<rule ref="category/java/errorprone.xml/AvoidEnumAsIdentifier" />
<rule ref="category/java/errorprone.xml/AvoidFieldNameMatchingMethodName" />
<rule ref="category/java/errorprone.xml/AvoidFieldNameMatchingTypeName" />
Expand Down Expand Up @@ -449,4 +455,4 @@
<rule ref="category/java/security.xml/HardCodedCryptoKey" />
<rule ref="category/java/security.xml/InsecureCryptoIv" />

</ruleset>
</ruleset>
8 changes: 4 additions & 4 deletions sdk-java/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apply plugin: 'java-library'
apply plugin: 'maven'
// apply plugin: 'maven'


buildscript {
Expand All @@ -8,15 +8,15 @@ buildscript {
//mavenLocal()
}
dependencies {
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.18.0' //for publishing
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.28.0' //for publishing
}
}

dependencies {
implementation 'org.json:json:20230227'
implementation 'org.json:json:20250107'
implementation 'com.google.code.findbugs:jsr305:3.0.2'

testImplementation 'junit:junit:4.12'
testImplementation 'junit:junit:4.13.1'
testImplementation 'org.mockito:mockito-core:2.8.9'
testImplementation "org.powermock:powermock-core:${POWERMOCK_VERSION}"
testImplementation "org.powermock:powermock-module-junit4:${POWERMOCK_VERSION}"
Expand Down
Loading
Loading