Skip to content

Commit 5365cd9

Browse files
chore: Setup the server-ai package
1 parent 3597e39 commit 5365cd9

File tree

15 files changed

+610
-0
lines changed

15 files changed

+610
-0
lines changed

lib/sdk/server-ai/.gitattributes

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#
2+
# https://help.github.com/articles/dealing-with-line-endings/
3+
#
4+
# Linux start script should use lf
5+
/gradlew text eol=lf
6+
7+
# These are Windows script files and should use crlf
8+
*.bat text eol=crlf
9+

lib/sdk/server-ai/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Ignore Gradle project-specific cache directory
2+
.gradle
3+
4+
# Ignore Gradle build output directory
5+
build
6+
bin

lib/sdk/server-ai/README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# LaunchDarkly AI SDK (server-side) for Java
2+
3+
# ⛔️⛔️⛔️⛔️
4+
5+
> [!CAUTION]
6+
> This library is in development and should not be considered ready for production use while this message is visible.
7+
8+
# ☝️☝️☝️☝️☝️☝️
9+
10+
11+
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.
12+
13+
Currently there is no client-side AI SDK for Java. If you're interested, please let us know by filing an issue!
14+
15+
## LaunchDarkly overview
16+
17+
[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!
18+
19+
[![Twitter Follow](https://img.shields.io/twitter/follow/launchdarkly.svg?style=social&label=Follow&maxAge=2592000)](https://twitter.com/intent/follow?screen_name=launchdarkly)
20+
21+
## Supported Java versions
22+
23+
This version of the LaunchDarkly SDK is intended to work with Java 8 and above.
24+
25+
## Getting started
26+
27+
Refer to the [SDK documentation](https://docs.launchdarkly.com/sdk/ai/java) *TKTK: Add Docs* for instructions on getting started with using the SDK.
28+
29+
## Signing
30+
31+
*TKTK: Does Java has any signing mechanism?*
32+
33+
## Learn more
34+
35+
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*
36+
37+
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).
38+
39+
## Contributing
40+
41+
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.
42+
43+
## About LaunchDarkly
44+
45+
* 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:
46+
* 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.
47+
* 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?).
48+
* 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.
49+
* 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.
50+
* 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.
51+
* Explore LaunchDarkly
52+
* [launchdarkly.com](https://www.launchdarkly.com/ "LaunchDarkly Main Website") for more information
53+
* [docs.launchdarkly.com](https://docs.launchdarkly.com/ "LaunchDarkly Documentation") for our documentation and SDK reference guides
54+
* [apidocs.launchdarkly.com](https://apidocs.launchdarkly.com/ "LaunchDarkly API Documentation") for our API documentation
55+
* [blog.launchdarkly.com](https://blog.launchdarkly.com/ "LaunchDarkly Blog Documentation") for the latest product updates

lib/sdk/server-ai/build.gradle

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
/*
2+
* This file was generated by the Gradle 'init' task.
3+
*
4+
* This generated file contains a sample Java library project to get you started.
5+
* For more details take a look at the 'Building Java & JVM projects' chapter in the Gradle
6+
* User Manual available at https://docs.gradle.org/8.8/userguide/building_java_projects.html
7+
*/
8+
9+
plugins {
10+
// Apply the java-library plugin for API and implementation separation.
11+
id 'base'
12+
id 'java-library'
13+
id "maven-publish"
14+
id "signing"
15+
id "io.github.gradle-nexus.publish-plugin" version "1.3.0"
16+
}
17+
18+
repositories {
19+
// Use Maven Central for resolving dependencies.
20+
mavenCentral()
21+
maven { url "https://oss.sonatype.org/content/groups/public/" }
22+
}
23+
24+
allprojects {
25+
group = 'com.launchdarkly'
26+
version = "${version}"
27+
}
28+
29+
base {
30+
archivesName = 'launchdarkly-java-server-sdk-ai'
31+
}
32+
33+
dependencies {
34+
// Use JUnit test framework.
35+
testImplementation 'junit:junit:4.13.2'
36+
37+
implementation "com.launchdarkly:launchdarkly-java-server-sdk:7.4.0"
38+
}
39+
40+
java {
41+
sourceCompatibility = JavaVersion.VERSION_1_8
42+
targetCompatibility = JavaVersion.VERSION_1_8
43+
withJavadocJar()
44+
withSourcesJar()
45+
}
46+
47+
publishing {
48+
publications {
49+
mavenJava(MavenPublication) {
50+
from components.java
51+
52+
pom {
53+
name.set("LaunchDarkly Java AI SDK (Server-side)")
54+
description.set("This package can be used to retrieve AI Config from LaunchDarkly.")
55+
url.set("https://github.com/launchdarkly/java-core")
56+
licenses {
57+
license {
58+
name.set("The Apache License, Version 2.0")
59+
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
60+
}
61+
}
62+
developers {
63+
developer {
64+
name.set("LaunchDarkly SDK Team")
65+
email.set("[email protected]")
66+
}
67+
}
68+
scm {
69+
connection.set("scm:git:git://github.com/launchdarkly/java-core.git")
70+
developerConnection.set("scm:git:ssh:[email protected]:launchdarkly/java-core.git")
71+
url.set("https://github.com/launchdarkly/java-core")
72+
}
73+
}
74+
}
75+
}
76+
}
77+
78+
nexusPublishing {
79+
clientTimeout = java.time.Duration.ofMinutes(2) // we've seen extremely long delays in creating repositories
80+
repositories {
81+
sonatype()
82+
}
83+
}
84+
85+
signing {
86+
sign(publishing.publications["mavenJava"])
87+
}

lib/sdk/server-ai/gradle.properties

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#x-release-please-start-version
2+
version=0.1.0
3+
#x-release-please-end
4+
5+
# The following empty ossrh properties are used by LaunchDarkly's internal integration testing framework
6+
# and should not be needed for typical development purposes (including by third-party developers).
7+
sonatypeUsername=
8+
sonatypePassword=
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This file was generated by the Gradle 'init' task.
2+
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format
3+
4+
[versions]
5+
guava = "33.0.0-jre"
6+
junit-jupiter = "5.10.2"
7+
8+
[libraries]
9+
guava = { module = "com.google.guava:guava", version.ref = "guava" }
10+
junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit-jupiter" }
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)