Skip to content
Draft
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
146 changes: 57 additions & 89 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ if (project.hasProperty('overrideBuildEnvironment')) {
// Otherwise, assume overrideBuildEnvironment defines a path to a file, and apply it.
apply from: project.overrideBuildEnvironment
}

task wrapper(type: Wrapper) {
gradleVersion = '6.4'
}

buildscript {
repositories {
mavenCentral()
Expand All @@ -17,14 +12,9 @@ buildscript {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.+'
}
}
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'


ext {
libs = [:]
}

libs += [
apache: "org.apache.commons:commons-lang3:3.4",
apacheCommonsIo: "commons-io:commons-io:2.4",
Expand All @@ -41,15 +31,14 @@ libs += [
restliServer: "com.linkedin.pegasus:restli-server:6.0.12",
restliNettyStandalone: "com.linkedin.pegasus:restli-netty-standalone:6.0.12"
]

allprojects {
version='0.0.5'
apply plugin: 'idea'
subprojects {
version='0.0.9'
group='com.linkedin.flashback'

apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'java'
apply plugin: 'idea'

dependencies {
compile libs.apache
Expand All @@ -64,56 +53,97 @@ allprojects {
compile libs.log4j
compile libs.netty
testCompile libs.testng

}

repositories {
mavenCentral()
}

test {
useTestNG()
}
tasks.withType(Jar) {
from "$rootDir/LICENSE"
from "$rootDir/NOTICE"
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
def pomConfig = {
licenses {
license {
name "2-CLAUSE BSD"
url "https://github.com/linkedin/flashback/blob/master/LICENSE"
distribution "repo"
}
}
scm {
url "https://github.com/linkedin/flashback.git"
}
}

publishing {
publications {
MyPublication(MavenPublication) {
from components.java
artifact javadocJar
artifact sourcesJar

pom.withXml {
def root = asNode()
root.appendNode('description', 'Mock the internet')
root.appendNode('name', 'flashback')
root.children().last() + pomConfig
}

}
}
}
bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_API_KEY')
publications = ['MyPublication']
pkg {
repo = 'maven'
userOrg = 'linkedin'
name = 'flashback'
vcsUrl = 'https://github.com/linkedin/flashback.git'
}
}
}

project(':flashback-test-util') {
println "Building project 'test-util'"

dependencies {
compile project(':flashback-core-impl')
compile project(':flashback-smartproxy')
compile project(':flashback-netty')
compile libs.testng
}
}

project(':flashback-smartproxy') {
println "Building project 'smartproxy'"

dependencies {
compile project(':flashback-core-impl')
compile project(':flashback-netty')
compile project(':mitm')
}
}

project(':flashback-netty') {
println "Building project 'netty'"

dependencies {
compile project(':flashback-core-impl')
}
}

project(':flashback-admin') {
apply plugin: 'java'

dependencies {
compile libs.restliServer
compile libs.restliNettyStandalone
compile project(':flashback-smartproxy')
}

task startAdminServer(type: JavaExec) {
main = 'com.linkedin.restli.server.NettyStandaloneLauncher'
if (project.hasProperty('Args')) {
Expand All @@ -124,7 +154,6 @@ project(':flashback-admin') {
standardInput = System.in
}
}

project(':flashback-all') {
dependencies {
// this is a meta project that depends on all of the "entry-point" subprojects to make it easier to pull in the
Expand All @@ -136,65 +165,4 @@ project(':flashback-all') {
compile project(':flashback-netty')
compile project(':flashback-admin')
}
}


tasks.withType(Jar) {
from "$rootDir/LICENSE"
from "$rootDir/NOTICE"
}

task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}

def pomConfig = {
licenses {
license {
name "2-CLAUSE BSD"
url "https://github.com/linkedin/flashback/blob/master/LICENSE"
distribution "repo"
}
}

scm {
url 'https://github.com/linkedin/flashback.git'

}
}


publishing {
publications {
MyPublication(MavenPublication) {
from components.java
artifact javadocJar
artifact sourcesJar

pom.withXml {
def root = asNode()
root.appendNode('name', 'flashback')
root.children().last() + pomConfig
}
}
}
}

bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_API_KEY')
publications = ['MyPublication']
pkg {
repo = 'maven'
userOrg = 'linkedin'
name = 'flashback'

vcsUrl = 'https://github.com/linkedin/flashback.git'
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ static public boolean isCompressedContentEncoding(String encodingName) {

/**
* Converts a URL / POST parameter string to an ordered map of key / value pairs
* @param paramsString the URL-encoded &-delimited string of key / value pairs
* @param paramsString the URL-encoded '&' delimited string of key / value pairs
* @return a LinkedHashMap representing the decoded parameters
*/
static public Map<String, String> stringToUrlParams(String paramsString, String charset)
Expand All @@ -87,7 +87,7 @@ static public Map<String, String> stringToUrlParams(String paramsString, String
/**
* Converts an ordered map of key / value pairs to a URL parameter string
* @param params the map of key / value pairs
* @return a string representation of the key / value pairs, delimited by '&'
* @return a string representation of the key / value pairs, delimited by '&amp;'
*/
static public String urlParamsToString(Map<String, String> params, String charset)
throws UnsupportedEncodingException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ protected String getCharset() {
}

/**
* Build serializable {@Link RecordedHttpBody} using temporary byte buffers.
* Build serializable {@link RecordedHttpBody} using temporary byte buffers.
* Based on Charset, we will build concrete Http body either binary or characters.
* TODO: throw customized exception if failed to create http body
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ protected void flashbackGlobalCleanUp() {
}

/**
* this is the place to override and change the default scene & matchrule on each test class.
* this is the place to override and change the default scene &amp; matchrule on each test class.
*
* @throws IOException
*/
Expand Down Expand Up @@ -291,7 +291,7 @@ private void determineDefaultSettings()
_defaultScene = SceneFactory.create(sceneConfiguration);
}

// after determined the default Scene&MatchRule for this test class, set them.
// after determined the default Scene &amp; MatchRule for this test class, set them.
_flashbackRunner.setScene(_defaultScene);
_flashbackRunner.setMatchRule(_defaultMatchRule);
}
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Wed Oct 26 12:30:45 EDT 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.13-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4-bin.zip
Loading