Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
distribution: temurin
java-version: 11
java-version: 17
cache: 'gradle'

- name: Grant execute permission for gradlew
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
distribution: temurin
java-version: 11
java-version: 17
cache: 'gradle'

- name: Grant execute permission for gradlew
Expand Down
17 changes: 10 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
apply plugin: 'com.android.application'
plugins {
id 'com.android.application'
}

android {
compileSdkVersion(33)
namespace "com.launchdarkly.hello_android"
compileSdk 34
defaultConfig {
applicationId "com.launchdarkly.hello_android"
minSdkVersion(21)
targetSdkVersion(33)
minSdkVersion(24)
targetSdkVersion(34)
versionCode 1
versionName "1.0"
}
Expand All @@ -16,12 +19,12 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}

dependencies {
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.launchdarkly:launchdarkly-android-client-sdk:4.2.2'
implementation 'com.launchdarkly:launchdarkly-android-client-sdk:5.11.0'
}
5 changes: 2 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.launchdarkly.hello_android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:icon="@mipmap/ic_launcher"
Expand All @@ -19,4 +18,4 @@
</activity>
</application>

</manifest>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.launchdarkly.sdk.LDContext;
import com.launchdarkly.sdk.android.LDClient;
import com.launchdarkly.sdk.android.LDConfig;
import com.launchdarkly.sdk.android.LDConfig.Builder.AutoEnvAttributes;

public class MainApplication extends Application {

Expand All @@ -18,7 +19,9 @@ public void onCreate() {

// Set LAUNCHDARKLY_MOBILE_KEY to your LaunchDarkly mobile key found on the LaunchDarkly
// dashboard in the start guide.
LDConfig ldConfig = new LDConfig.Builder()
// If you want to disable the Auto EnvironmentAttributes functionality,
// use AutoEnvAttributes.Disabled as the argument to the Builder.
LDConfig ldConfig = new LDConfig.Builder(AutoEnvAttributes.Enabled)
.mobileKey(LAUNCHDARKLY_MOBILE_KEY)
.build();

Expand Down
28 changes: 2 additions & 26 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,28 +1,4 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'

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

allprojects {
repositories {
mavenLocal()
// Before LaunchDarkly release artifacts get synced to Maven Central they are here along with snapshots:
maven { url = uri("https://oss.sonatype.org/content/groups/public/") }
google()
mavenCentral()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
plugins {
id 'com.android.application' version '8.7.0' apply false
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
18 changes: 18 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
pluginManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
mavenLocal()
// Before LaunchDarkly release artifacts get synced to Maven Central they are here along with snapshots:
maven { url = uri("https://oss.sonatype.org/content/groups/public/") }
}
}
rootProject.name = "hello-android-java"
include ':app'