Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
31 changes: 24 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Android-ci
name: Android CI

on:
push:
Expand All @@ -14,11 +14,28 @@ permissions:
jobs:
build:
runs-on: ubuntu-latest
container:
image: docker://fabernovel/android:api-31-v1.6.0
steps:
- uses: actions/checkout@v4
- name: Build with Gradle
run: ./gradlew dependencies
- name: Test
run: ./gradlew test
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
cache: gradle
- name: Set up Android SDK
uses: android-actions/setup-android@v3
- name: Install Android SDK packages
run: sdkmanager "platform-tools" "platforms;android-36" "build-tools;36.0.0"
- name: Lint
run: ./gradlew :sift:lint :hello-sift:lintDebug
- name: Build and test
run: ./gradlew clean test :sift:assembleRelease :hello-sift:assembleDebug
- name: Connected smoke test (hello-sift)
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
arch: x86_64
profile: Nexus 6
disable-animations: true
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
script: ./gradlew :hello-sift:connectedDebugAndroidTest
20 changes: 11 additions & 9 deletions .github/workflows/publish2sonatype.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,29 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '8.0.362'
distribution: 'zulu'
distribution: temurin
java-version: '17'
cache: gradle
- name: Set up Android SDK
uses: android-actions/setup-android@v3
- name: Install Android SDK packages
run: sdkmanager "platform-tools" "platforms;android-36" "build-tools;36.0.0"
- name: Prepare gradle.properties
run: |
cd sift
echo "$(pwd)"
echo -e "${{ secrets.SECRING }}" | base64 -d > ./secring.gpg
echo "$(ls -la)"
echo "signing.keyId=${{ secrets.KEYID }}" >> ./gradle.properties
echo "signing.password=${{ secrets.PASS }}" >> ./gradle.properties
echo "signing.secretKeyRingFile=$(pwd)/secring.gpg" >> ./gradle.properties
echo "NEXUS_USERNAME=${{ secrets.SUSER }}" >> ./gradle.properties
echo "NEXUS_PASSWORD=${{ secrets.SPASSWORD }}" >> ./gradle.properties
echo "$(ls -la)"
- name: Sonatype Publish
run: |
./gradlew uploadArchives
./gradlew :sift:publishReleasePublicationToSonatypeRepository
BEARER=$(printf "${{ secrets.SUSER }}:${{ secrets.SPASSWORD }}" | base64)
curl --request POST \
--verbose \
Expand Down
30 changes: 29 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,32 @@
# Change Log
# Change Log

## [1.3.1] - 2026-03-03

### Breaking Changes
- Generated event models now rely on getters/setters. Direct field access in `com.sift.api.representations` may be source-incompatible and should be migrated.

### Changed
- Migrated build system to Gradle 8.13 and Android Gradle Plugin 8.13.2.
- Refreshed the full Gradle wrapper set (`gradle-wrapper.properties`, `gradlew`, `gradlew.bat`, `gradle-wrapper.jar`).
- Updated Android SDK levels to compileSdk 36 / targetSdk 36 while keeping `minSdk 19`.
- Added Java toolchain configuration to compile with JDK 17 and set project JVM args for modern Gradle runs.
- Updated core and test dependencies (Gson, AppCompat, JUnit, Mockito, WireMock, AndroidX Test).
- Migrated publishing flow to `maven-publish` and Sonatype publish tasks.
- Updated CI and publishing GitHub Actions workflows to JDK 17 + Android SDK API 36 and removed debug-only workflow output.
- Added a Compatibility section to README.

### Removed
- Removed `jcenter()` repository usage and legacy repository declarations.
- Removed explicit `androidTest` dependency on `androidx.annotation`.
- Removed legacy `uploadArchives` compatibility task.
- Removed legacy AWS Device Farm Gradle integration (`keys.gradle` / `devicefarm` hook in sample app).

### Fixed
- Fixed Gradle/AGP migration issues (new DSL requirements, namespace setup, manifest package migration, and modern publishing setup).
- Fixed `jsonschema2pojo` migration incompatibilities (`existingJavaType` schema usage and generated model integration updates).
- Updated SDK source and tests to generated-model accessors.
- Reduced noisy non-Android unit test logs for missing `getprop` / `mount` commands.
- Added Mockito Java agent setup for unit tests to avoid JDK dynamic agent self-attach warnings.

## [1.3.0] - 2023-01-30

Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- [Introduction](#introduction)
- [Installation](#installation)
- [Compatibility](#compatibility)
- [Integration](#integration)
- [Application Integration](#application)
- [Custom Integration](#custom)
Expand Down Expand Up @@ -46,6 +47,21 @@ android {
}
```

<a name="compatibility"></a>
## Compatibility

- `minSdk` is `19` (Android 4.4+).
- Generated classes under `com.sift.api.representations` should be accessed via getters/setters.
- If your integration directly references generated model fields, migrate to accessors:

```java
// Before
event.userId = "SOME_USER_ID";

// After
event.setUserId("SOME_USER_ID");
```

<a name="integration"></a>
## Integrating Sift

Expand Down
31 changes: 6 additions & 25 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,30 +1,11 @@
// Build file of Sift Science Android SDK.

buildscript {
repositories {
jcenter()
mavenCentral()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.2'
classpath 'com.amazonaws:aws-devicefarm-gradle-plugin:1.1'
}
plugins {
id 'com.android.application' version '8.13.2' apply false
id 'com.android.library' version '8.13.2' apply false
id 'org.jsonschema2pojo' version '1.3.3' apply false
}

allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
}

task clean(type: Delete) {
delete rootProject.buildDir
tasks.register('clean', Delete) {
delete rootProject.layout.buildDirectory
}
7 changes: 4 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

VERSION_NAME=1.3.0
VERSION_CODE=25
VERSION_NAME=1.3.1
VERSION_CODE=26

GROUP=com.siftscience

Expand All @@ -34,4 +34,5 @@ POM_DEVELOPER_ID=garylee1
POM_DEVELOPER_NAME=Gary Lee

android.useAndroidX=true
android.enableJetifier=true

org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
13 changes: 13 additions & 0 deletions gradle/gradle-daemon-jvm.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#This file is generated by updateDaemonJvm
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/536afcd1dff540251f85e5d2c80458cf/redirect
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/67a0fee3c4236b6397dcbe8575ca2011/redirect
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/536afcd1dff540251f85e5d2c80458cf/redirect
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/67a0fee3c4236b6397dcbe8575ca2011/redirect
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/0b98aec810298c2c1d7fdac5dac37910/redirect
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/9c55677aff3966382f3d853c0959bfb2/redirect
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/536afcd1dff540251f85e5d2c80458cf/redirect
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/67a0fee3c4236b6397dcbe8575ca2011/redirect
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/248ffb1098f61659502d0c09aa348294/redirect
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/056dc25d3b9d168ede8b94d3d2f99942/redirect
toolchainVendor=JETBRAINS
toolchainVersion=21
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 3 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#Wed Oct 14 10:29:10 IST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
Loading