Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 3.4.0 #551

Merged
merged 7 commits into from
Nov 1, 2023
Merged
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
30 changes: 30 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Internal deploy

on:
push:
branches:
- development

jobs:
build-app:
name: Build App
runs-on: ubuntu-latest
env:
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
ARTIFACTORY_TOKEN: ${{ secrets.ARTIFACTORY_TOKEN }}
steps:
- name: checkout
uses: actions/checkout@v3

- name: Gradle cache
uses: gradle/[email protected]

- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
cache: 'gradle'

- name: Publish
run: ./gradlew publishDev
9 changes: 9 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
3.4.0 (Oct 31, 2023)
- Added support for Flag Sets on the SDK, which enables grouping feature flags and interacting with the group rather than individually (more details in our documentation):
- Added new variations of the get treatment methods to support evaluating flags in given flag set/s.
- getTreatmentsByFlagSet and getTreatmentsByFlagSets
- getTreatmentWithConfigByFlagSets and getTreatmentsWithConfigByFlagSets
- Added a new optional Split Filter configuration option. This allows the SDK and Split services to only synchronize the flags in the specified flag sets, avoiding unused or unwanted flags from being synced on the SDK instance, bringing all the benefits from a reduced payload.
- Updated the following SDK manager method to expose flag sets on flag views:
- Added `defaultTreatment` property to the `SplitView` object returned by the `split` and `splits` methods of the SDK manager.

3.3.0 (Jul 18, 2023)
- Improved streaming architecture implementation to apply feature flag updates from the notification received which is now enhanced, improving efficiency and reliability of the whole update system.
- Added logic to do a full check of feature flags immediately when the app comes back to foreground, limited to once per minute.
Expand Down
138 changes: 88 additions & 50 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ apply plugin: 'signing'
apply plugin: 'kotlin-android'

ext {
splitVersion = '3.3.0'
splitVersion = '3.4.0'
}

android {
compileSdkVersion 31
compileSdk 33
targetCompatibility = '1.8'
sourceCompatibility = '1.8'

Expand All @@ -31,8 +31,8 @@ android {

defaultConfig {

minSdkVersion 15
targetSdkVersion 30
minSdk 15
targetSdk 31
multiDexEnabled true

consumerProguardFiles 'split-proguard-rules.pro'
Expand Down Expand Up @@ -159,6 +159,60 @@ dependencies {
androidTestImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlinVer"
}

def splitPOM = {
name = 'Split Android SDK'
packaging = 'aar'
description = 'Official Split Android SDK'
url = 'https://github.com/splitio/android-client'

licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}

developers {
developer {
id = 'sarrubia'
name = 'Sebastian Arrubia'
email = '[email protected]'
}

developer {
id = 'fernando'
name = 'Fernando Martin'
email = '[email protected]'
}
}

scm {
connection = 'scm:git:[email protected]:splitio/android-client.git'
developerConnection = 'scm:[email protected]:splitio/android-client.git'
url = 'https://github.com/splitio/android-client'
}
}

def releaseRepo = {
name = "ReleaseRepo"
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = ossrhUsername
password = ossrhPassword
}
}

def devRepo = {
name = "DevelopmentRepo"
url = 'https://splitio.jfrog.io/artifactory/maven-all-virtual'
credentials {
username = System.getenv('ARTIFACTORY_USER')
password = System.getenv('ARTIFACTORY_TOKEN')
}
}

afterEvaluate {
android.sourceSets.all { sourceSet ->
if (!sourceSet.name.startsWith("test")) {
Expand All @@ -168,69 +222,53 @@ afterEvaluate {

publishing {
publications {
project.components.all { print("PRJ NAME: " + name) }
release(MavenPublication) {
from components.release

artifactId = 'android-client'
groupId = 'io.split.client'
version = splitVersion
artifact sourcesJar
artifact javadocJar

pom {
name = 'Split Android SDK'
packaging = 'aar'
description = 'Official Split Android SDK'
url = 'https://github.com/splitio/android-client'

licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}

developers {
developer {
id = 'sarrubia'
name = 'Sebastian Arrubia'
email = '[email protected]'
}

developer {
id = 'fernando'
name = 'Fernando Martin'
email = '[email protected]'
}
}

scm {
connection = 'scm:git:[email protected]:splitio/android-client.git'
developerConnection = 'scm:[email protected]:splitio/android-client.git'
url = 'https://github.com/splitio/android-client'
}
}
pom splitPOM

repositories {
maven {
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = ossrhUsername
password = ossrhPassword
}
}
maven releaseRepo
maven devRepo
}
}

development(MavenPublication) {
from components.release

artifactId = 'android-client'
groupId = 'io.split.client'
version = splitVersion
artifact sourcesJar
artifact javadocJar

pom splitPOM
}
}
}
}

signing {
sign publishing.publications
task publishRelease(type: PublishToMavenRepository) {
publication = publishing.publications.getByName("release")
repository = publishing.repositories.ReleaseRepo
}

task publishDev(type: PublishToMavenRepository) {
publication = publishing.publications.getByName("development")
repository = publishing.repositories.DevelopmentRepo
}

signing {
sign publishing.publications.getByName("release")
}
}


task sourcesJar(type: Jar) {
archiveClassifier.set("sources")
from android.sourceSets.main.java.srcDirs
Expand Down
1 change: 1 addition & 0 deletions src/androidTest/assets/split_changes_flag_set-0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"splits":[{"trafficTypeName":"client","name":"workm","trafficAllocation":100,"trafficAllocationSeed":147392224,"seed":524417105,"status":"ACTIVE","killed":false,"defaultTreatment":"on","changeNumber":1602798638344,"algo":2,"configurations":{},"sets":["set_3"],"conditions":[{"conditionType":"ROLLOUT","matcherGroup":{"combiner":"AND","matchers":[{"keySelector":{"trafficType":"client","attribute":null},"matcherType":"IN_SEGMENT","negate":false,"userDefinedSegmentMatcherData":{"segmentName":"new_segment"},"whitelistMatcherData":null,"unaryNumericMatcherData":null,"betweenMatcherData":null,"booleanMatcherData":null,"dependencyMatcherData":null,"stringMatcherData":null}]},"partitions":[{"treatment":"on","size":0},{"treatment":"off","size":0},{"treatment":"free","size":100},{"treatment":"conta","size":0}],"label":"in segment new_segment"},{"conditionType":"ROLLOUT","matcherGroup":{"combiner":"AND","matchers":[{"keySelector":{"trafficType":"client","attribute":null},"matcherType":"ALL_KEYS","negate":false,"userDefinedSegmentMatcherData":null,"whitelistMatcherData":null,"unaryNumericMatcherData":null,"betweenMatcherData":null,"booleanMatcherData":null,"dependencyMatcherData":null,"stringMatcherData":null}]},"partitions":[{"treatment":"on","size":100},{"treatment":"off","size":0},{"treatment":"free","size":0},{"treatment":"conta","size":0}],"label":"default rule"}]}],"since":1602797638344,"till":1602798638344}
1 change: 1 addition & 0 deletions src/androidTest/assets/split_changes_flag_set-1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"splits":[{"trafficTypeName":"client","name":"workm","trafficAllocation":100,"trafficAllocationSeed":147392224,"seed":524417105,"status":"ACTIVE","killed":false,"defaultTreatment":"on","changeNumber":1602797638344,"algo":2,"configurations":{},"sets":["set_1"],"conditions":[{"conditionType":"ROLLOUT","matcherGroup":{"combiner":"AND","matchers":[{"keySelector":{"trafficType":"client","attribute":null},"matcherType":"IN_SEGMENT","negate":false,"userDefinedSegmentMatcherData":{"segmentName":"new_segment"},"whitelistMatcherData":null,"unaryNumericMatcherData":null,"betweenMatcherData":null,"booleanMatcherData":null,"dependencyMatcherData":null,"stringMatcherData":null}]},"partitions":[{"treatment":"on","size":0},{"treatment":"off","size":0},{"treatment":"free","size":100},{"treatment":"conta","size":0}],"label":"in segment new_segment"},{"conditionType":"ROLLOUT","matcherGroup":{"combiner":"AND","matchers":[{"keySelector":{"trafficType":"client","attribute":null},"matcherType":"ALL_KEYS","negate":false,"userDefinedSegmentMatcherData":null,"whitelistMatcherData":null,"unaryNumericMatcherData":null,"betweenMatcherData":null,"booleanMatcherData":null,"dependencyMatcherData":null,"stringMatcherData":null}]},"partitions":[{"treatment":"on","size":100},{"treatment":"off","size":0},{"treatment":"free","size":0},{"treatment":"conta","size":0}],"label":"default rule"}]}],"since":1602796638344,"till":1602797638344}
1 change: 1 addition & 0 deletions src/androidTest/assets/split_changes_flag_set-2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"splits":[{"trafficTypeName":"client","name":"workm","trafficAllocation":100,"trafficAllocationSeed":147392224,"seed":524417105,"status":"ACTIVE","killed":false,"defaultTreatment":"on","changeNumber":1602796638344,"algo":2,"configurations":{},"sets":["set_1","set_2"],"conditions":[{"conditionType":"ROLLOUT","matcherGroup":{"combiner":"AND","matchers":[{"keySelector":{"trafficType":"client","attribute":null},"matcherType":"IN_SEGMENT","negate":false,"userDefinedSegmentMatcherData":{"segmentName":"new_segment"},"whitelistMatcherData":null,"unaryNumericMatcherData":null,"betweenMatcherData":null,"booleanMatcherData":null,"dependencyMatcherData":null,"stringMatcherData":null}]},"partitions":[{"treatment":"on","size":0},{"treatment":"off","size":0},{"treatment":"free","size":100},{"treatment":"conta","size":0}],"label":"in segment new_segment"},{"conditionType":"ROLLOUT","matcherGroup":{"combiner":"AND","matchers":[{"keySelector":{"trafficType":"client","attribute":null},"matcherType":"ALL_KEYS","negate":false,"userDefinedSegmentMatcherData":null,"whitelistMatcherData":null,"unaryNumericMatcherData":null,"betweenMatcherData":null,"booleanMatcherData":null,"dependencyMatcherData":null,"stringMatcherData":null}]},"partitions":[{"treatment":"on","size":100},{"treatment":"off","size":0},{"treatment":"free","size":0},{"treatment":"conta","size":0}],"label":"default rule"}]},{"trafficTypeName":"client","name":"workm_set_3","trafficAllocation":100,"trafficAllocationSeed":147392224,"seed":524417105,"status":"ACTIVE","killed":false,"defaultTreatment":"on","changeNumber":1602796638344,"algo":2,"configurations":{},"sets":["set_3"],"conditions":[{"conditionType":"ROLLOUT","matcherGroup":{"combiner":"AND","matchers":[{"keySelector":{"trafficType":"client","attribute":null},"matcherType":"IN_SEGMENT","negate":false,"userDefinedSegmentMatcherData":{"segmentName":"new_segment"},"whitelistMatcherData":null,"unaryNumericMatcherData":null,"betweenMatcherData":null,"booleanMatcherData":null,"dependencyMatcherData":null,"stringMatcherData":null}]},"partitions":[{"treatment":"on","size":0},{"treatment":"off","size":0},{"treatment":"free","size":100},{"treatment":"conta","size":0}],"label":"in segment new_segment"},{"conditionType":"ROLLOUT","matcherGroup":{"combiner":"AND","matchers":[{"keySelector":{"trafficType":"client","attribute":null},"matcherType":"ALL_KEYS","negate":false,"userDefinedSegmentMatcherData":null,"whitelistMatcherData":null,"unaryNumericMatcherData":null,"betweenMatcherData":null,"booleanMatcherData":null,"dependencyMatcherData":null,"stringMatcherData":null}]},"partitions":[{"treatment":"on","size":100},{"treatment":"off","size":0},{"treatment":"free","size":0},{"treatment":"conta","size":0}],"label":"default rule"}]}],"since":-1,"till":1602796638344}
20 changes: 20 additions & 0 deletions src/androidTest/java/fake/SplitClientStub.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,26 @@ public Map<String, SplitResult> getTreatmentsWithConfig(List<String> featureFlag
return null;
}

@Override
public Map<String, String> getTreatmentsByFlagSet(@NonNull String flagSet, @Nullable Map<String, Object> attributes) {
return null;
}

@Override
public Map<String, String> getTreatmentsByFlagSets(@NonNull List<String> flagSets, @Nullable Map<String, Object> attributes) {
return null;
}

@Override
public Map<String, SplitResult> getTreatmentsWithConfigByFlagSet(@NonNull String flagSet, @Nullable Map<String, Object> attributes) {
return null;
}

@Override
public Map<String, SplitResult> getTreatmentsWithConfigByFlagSets(@NonNull List<String> flagSets, @Nullable Map<String, Object> attributes) {
return null;
}

@Override
public void destroy() {

Expand Down
5 changes: 0 additions & 5 deletions src/androidTest/java/fake/SynchronizerSpyImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ public void loadAndSynchronizeSplits() {
mSynchronizer.loadAndSynchronizeSplits();
}

@Override
public void loadSplitsFromCache() {
mSynchronizer.loadSplitsFromCache();
}

@Override
public void loadMySegmentsFromCache() {
mSynchronizer.loadMySegmentsFromCache();
Expand Down
Loading