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
16 changes: 9 additions & 7 deletions java-quickstart/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
Optimizely Java QuickStart
===================

This repository houses the Java Quickstart app that can be used to test that your java SDK can communicate with the cdn and Optimizely results. Simply create a new project with an experiment called "background_experiment" with 2 variations and a conversion event named "sample_conversion". From there you can test different attributes setups and other Optimizely Java SDK APIs. This is just a simple example that gets you up and running. Normally, the Java SDK would be running with a application server such as Dropwizard.
This package contains the Java QuickStart app that can be used to test that the Java SDK can communicate with the CDN and Optimizely results.
Simply create a new project with an experiment called "background_experiment" with 2 variations and a conversion event named "sample_conversion".
From there you can test different attributes setups and other Optimizely Java SDK APIs.
This is just a simple example that gets you up and running quickly!

## Getting Started
Simply create a experiment on app.optimizely.com named "background_experiment" with variation_a and variation_b and one conversion event "simple_conversion." Use that SDK key in the Example.java and you are set to test.
Create an experiment on app.optimizely.com named "background_experiment" with variations "variation_a" and "variation_b" and one conversion event "sample_conversion.".
Use that SDK key in the [`com.optimizely.Example.java`](https://github.com/optimizely/java-sdk/blob/master/java-quickstart/src/main/java/com/optimizely/Example.java)
and you are set to test.

### Installing the SDK
In the instance here we are using jar files copied into the libs directory for linking with the Optimizely Java SDK.
### Run Example

#### Gradle

You can do a ```./gradlew``` build and run via run.sh.
Running `./gradlew runExample` will build and execute [`com.optimizely.Example.java`](https://github.com/optimizely/java-sdk/blob/master/java-quickstart/src/main/java/com/optimizely/Example.java).
14 changes: 5 additions & 9 deletions java-quickstart/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
plugins {
id 'java'
}

group 'optimizely'
version '1.0-SNAPSHOT'

sourceCompatibility = 1.8

dependencies {
compile project(':core-api')
compile project(':core-httpclient-impl')
Expand All @@ -16,3 +7,8 @@ dependencies {
compile group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.7.25'
testCompile group: 'junit', name: 'junit', version: '4.12'
}

task runExample(type: JavaExec) {
main "com.optimizely.Example"
classpath sourceSets.test.runtimeClasspath
}
172 changes: 0 additions & 172 deletions java-quickstart/gradlew

This file was deleted.

84 changes: 0 additions & 84 deletions java-quickstart/gradlew.bat

This file was deleted.

1 change: 0 additions & 1 deletion java-quickstart/run.sh

This file was deleted.