Skip to content

chore: Setup the server-ai package #54

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

Open
wants to merge 1 commit into
base: lc/SDK-1192/AI-config-feature-branch
Choose a base branch
from
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
9 changes: 9 additions & 0 deletions lib/sdk/server-ai/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# Linux start script should use lf
/gradlew text eol=lf

# These are Windows script files and should use crlf
*.bat text eol=crlf

6 changes: 6 additions & 0 deletions lib/sdk/server-ai/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Ignore Gradle project-specific cache directory
.gradle

# Ignore Gradle build output directory
build
bin
55 changes: 55 additions & 0 deletions lib/sdk/server-ai/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# LaunchDarkly AI SDK (server-side) for Java

# ⛔️⛔️⛔️⛔️

> [!CAUTION]
> This library is in development and should not be considered ready for production use while this message is visible.

# ☝️☝️☝️☝️☝️☝️


The LaunchDarkly AI SDK (server-side) for Java is designed primarily for use in multi-user systems such as web servers and applications. It follows the server-side LaunchDarkly model for multi-user contexts. It is not intended for use in desktop and embedded systems applications.

Currently there is no client-side AI SDK for Java. If you're interested, please let us know by filing an issue!

## LaunchDarkly overview

[LaunchDarkly](https://www.launchdarkly.com) is a feature management platform that serves trillions of feature flags daily to help teams build better software, faster. [Get started](https://docs.launchdarkly.com/home/getting-started) using LaunchDarkly today!

[![Twitter Follow](https://img.shields.io/twitter/follow/launchdarkly.svg?style=social&label=Follow&maxAge=2592000)](https://twitter.com/intent/follow?screen_name=launchdarkly)

## Supported Java versions

This version of the LaunchDarkly SDK is intended to work with Java 8 and above.

## Getting started

Refer to the [SDK documentation](https://docs.launchdarkly.com/sdk/ai/java) *TKTK: Add Docs* for instructions on getting started with using the SDK.

## Signing

*TKTK: Does Java has any signing mechanism?*

## Learn more

Read our [documentation](https://docs.launchdarkly.com) for in-depth instructions on configuring and using LaunchDarkly. You can also head straight to the [complete reference guide for this SDK](https://docs.launchdarkly.com/sdk/ai/java). *TKTK: Add Docs*

The authoritative description of all types, properties, and methods is in the [generated API documentation](https://launchdarkly.github.io/java-core/lib/sdk/server-ai).

## Contributing

We encourage pull requests and other contributions from the community. Check out our [contributing guidelines](CONTRIBUTING.md) for instructions on how to contribute to this SDK.

## About LaunchDarkly

* LaunchDarkly is a continuous delivery platform that provides feature flags as a service and allows developers to iterate quickly and safely. We allow you to easily flag your features and manage them from the LaunchDarkly dashboard. With LaunchDarkly, you can:
* Roll out a new feature to a subset of your users (like a group of users who opt-in to a beta tester group), gathering feedback and bug reports from real-world use cases.
* Gradually roll out a feature to an increasing percentage of users, and track the effect that the feature has on key metrics (for instance, how likely is a user to complete a purchase if they have feature A versus feature B?).
* Turn off a feature that you realize is causing performance problems in production, without needing to re-deploy, or even restart the application with a changed configuration file.
* Grant access to certain features based on user attributes, like payment plan (eg: users on the ‘gold’ plan get access to more features than users in the ‘silver’ plan). Disable parts of your application to facilitate maintenance, without taking everything offline.
* LaunchDarkly provides feature flag SDKs for a wide variety of languages and technologies. Read [our documentation](https://docs.launchdarkly.com/sdk) for a complete list.
* Explore LaunchDarkly
* [launchdarkly.com](https://www.launchdarkly.com/ "LaunchDarkly Main Website") for more information
* [docs.launchdarkly.com](https://docs.launchdarkly.com/ "LaunchDarkly Documentation") for our documentation and SDK reference guides
* [apidocs.launchdarkly.com](https://apidocs.launchdarkly.com/ "LaunchDarkly API Documentation") for our API documentation
* [blog.launchdarkly.com](https://blog.launchdarkly.com/ "LaunchDarkly Blog Documentation") for the latest product updates
87 changes: 87 additions & 0 deletions lib/sdk/server-ai/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java library project to get you started.
* For more details take a look at the 'Building Java & JVM projects' chapter in the Gradle
* User Manual available at https://docs.gradle.org/8.8/userguide/building_java_projects.html
*/

plugins {
// Apply the java-library plugin for API and implementation separation.
id 'base'
id 'java-library'
id "maven-publish"
id "signing"
id "io.github.gradle-nexus.publish-plugin" version "1.3.0"
}

repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
maven { url "https://oss.sonatype.org/content/groups/public/" }
}

allprojects {
group = 'com.launchdarkly'
version = "${version}"
}

base {
archivesName = 'launchdarkly-java-server-sdk-ai'
}

dependencies {
// Use JUnit test framework.
testImplementation 'junit:junit:4.13.2'

implementation "com.launchdarkly:launchdarkly-java-server-sdk:7.4.0"
}

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withJavadocJar()
withSourcesJar()
}

publishing {
publications {
mavenJava(MavenPublication) {
from components.java

pom {
name.set("LaunchDarkly Java AI SDK (Server-side)")
description.set("This package can be used to retrieve AI Config from LaunchDarkly.")
url.set("https://github.com/launchdarkly/java-core")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
name.set("LaunchDarkly SDK Team")
email.set("[email protected]")
}
}
scm {
connection.set("scm:git:git://github.com/launchdarkly/java-core.git")
developerConnection.set("scm:git:ssh:[email protected]:launchdarkly/java-core.git")
url.set("https://github.com/launchdarkly/java-core")
}
}
}
}
}

nexusPublishing {
clientTimeout = java.time.Duration.ofMinutes(2) // we've seen extremely long delays in creating repositories
repositories {
sonatype()
}
}

signing {
sign(publishing.publications["mavenJava"])
}
8 changes: 8 additions & 0 deletions lib/sdk/server-ai/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#x-release-please-start-version
version=0.1.0
#x-release-please-end

# The following empty ossrh properties are used by LaunchDarkly's internal integration testing framework
# and should not be needed for typical development purposes (including by third-party developers).
sonatypeUsername=
sonatypePassword=
10 changes: 10 additions & 0 deletions lib/sdk/server-ai/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This file was generated by the Gradle 'init' task.
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format

[versions]
guava = "33.0.0-jre"
junit-jupiter = "5.10.2"

[libraries]
guava = { module = "com.google.guava:guava", version.ref = "guava" }
junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit-jupiter" }
Binary file not shown.
7 changes: 7 additions & 0 deletions lib/sdk/server-ai/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading