Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: 47degrees/hood
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.8.0
Choose a base ref
...
head repository: 47degrees/hood
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 500 additions and 257 deletions.
  1. +1 −0 .github/CODEOWNERS
  2. +2 −0 .gitignore
  3. +1 −1 .travis.yml
  4. +3 −1 README.md
  5. +22 −46 build.gradle
  6. +3 −3 deploy-scripts/deploy.sh
  7. +26 −4 deploy-scripts/deploy_common.sh
  8. +0 −12 deploy-scripts/deploy_functions.sh
  9. +2 −5 deploy-scripts/deploy_release.sh
  10. +2 −5 deploy-scripts/deploy_snapshot.sh
  11. +56 −52 docs/Gemfile.lock
  12. +6 −2 docs/_config.yml
  13. +15 −3 docs/_data/features.yml
  14. +11 −5 docs/_data/menu.yml
  15. +4 −9 docs/_data/sidebar.yml
  16. +20 −1 docs/_includes/_doc.html
  17. +26 −0 docs/_includes/_dropdown.html
  18. +7 −11 docs/_includes/_footer.html
  19. +7 −2 docs/_includes/_head.html
  20. +9 −6 docs/_includes/_jumbotron.html
  21. +11 −3 docs/_includes/_main.html
  22. +6 −4 docs/_includes/_navbar.html
  23. +2 −0 docs/_sass/_main.scss
  24. +31 −2 docs/_sass/added/_added-doc.scss
  25. +15 −0 docs/_sass/added/_added-dropdown.scss
  26. +1 −1 docs/_sass/added/_added-jumbotron.scss
  27. +5 −0 docs/_sass/added/_added-main.scss
  28. +2 −2 docs/_sass/added/_added-nav.scss
  29. +9 −3 docs/_sass/added/_added-sidebar.scss
  30. +1 −0 docs/_sass/custom/_custom-variables.scss
  31. +67 −12 docs/docs/CI/README.md
  32. +15 −7 docs/docs/README.md
  33. +6 −4 docs/docs/benchmarks/README.md
  34. +10 −8 docs/docs/upload/README.md
  35. BIN docs/img/poster.png
  36. +18 −0 docs/js/docs.js
  37. +21 −7 gradle.properties
  38. +8 −28 gradle/gradle-mvn-push.gradle
  39. +26 −0 gradle/gradle-publish-plugin.gradle
  40. +1 −1 gradle/wrapper/gradle-wrapper.properties
  41. +0 −1 settings.gradle
  42. +18 −4 src/main/kotlin/com/fortysevendeg/hood/HoodComparison.kt
  43. +4 −2 src/main/kotlin/com/fortysevendeg/hood/models/models.kt
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@47degrees/tatooine
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -27,3 +27,5 @@ _site
## Ruby environment normalization
.bundle/
vendor/

pub-dir
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ jobs:
include:
- stage: build
script:
- ./gradlew clean build test
- ./gradlew clean build
- stage: deploy-site
install:
- rvm use 2.6.0 --install --fuzzy
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Hood

[![Maven metadata URL](https://img.shields.io/maven-metadata/v?color=blue&label=latest%20release&metadataUrl=https%3A%2F%2Fplugins.gradle.org%2Fm2%2Fcom%2F47deg%2Fhood%2Fmaven-metadata.xml)](https://plugins.gradle.org/plugin/com.47deg.hood)

**Hood** is a `Gradle` plugin to compare benchmarks and set the result as a `Github` status for a `Pull Request`.
**Hood** is built on [Arrow](https://arrow-kt.io/), a Functional companion to Kotlin's Standard Library.

Please see the [Hood Microsite](https://47deg.github.io/hood/) for more information.
Please see the [Hood Microsite](https://47degrees.github.io/hood/) for more information.
68 changes: 22 additions & 46 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,43 +1,26 @@
buildscript {
ext {
kotlinVersion = "1.3.40"
arrowVersion = "0.9.0"
http4kVersion = "3.160.1"
kotlintestVersion = "3.3.3"
bintrayVersion = "1.8.4"
csvVersion = "1.5"
}

repositories {
maven { url "https://plugins.gradle.org/m2/" }
mavenCentral()
jcenter()
}

dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:$bintrayVersion"
}
}

apply plugin: "kotlin"
apply plugin: "java-gradle-plugin"
apply plugin: "com.jfrog.bintray"
apply plugin: "maven-publish"
plugins {
id "java-gradle-plugin"
id "maven-publish"
id "com.gradle.plugin-publish" version "0.11.0"
id "org.jetbrains.kotlin.jvm" version "1.3.71"
}

repositories {
maven { url "https://dl.bintray.com/arrow-kt/arrow-kt/" }
mavenCentral()
}

apply from: rootProject.file("gradle/gradle-mvn-push.gradle")

test {
useJUnitPlatform()
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"

implementation "io.arrow-kt:arrow-core-data:$arrowVersion"
implementation "io.arrow-kt:arrow-core-extensions:$arrowVersion"
@@ -65,30 +48,23 @@ sourceSets {
test.java.srcDirs += "src/test/kotlin"
}

gradlePlugin {
plugins {
hood {
id = "com.47deg.hood"
implementationClass = "com.fortysevendeg.hood.HoodPlugin"
}
}
test {
useJUnitPlatform()
}

def findPropertyOrEnv(String key) {
[project.properties[key], System.getenv(key)].find { it != null }
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier = "sources"
from sourceSets.main.allSource,
"build/generated/source/kapt/main",
"build/generated/source/kapt/debug",
"build/generated/source/kapt/release",
"build/generated/source/kaptKotlin/main",
"build/generated/source/kaptKotlin/debug",
"build/generated/source/kaptKotlin/release",
"build/tmp/kapt/main/kotlinGenerated"
}

bintray {
publish = true
user = findPropertyOrEnv("BINTRAY_USER") ?: "no.bintray.user"
key = findPropertyOrEnv("BINTRAY_API_KEY") ?: "no.bintray.api.key"
publications = ["HoodPublication"]
configurations = ["archives"]
pkg {
repo = "hood"
name = project.name
userOrg = POM_DEVELOPER_ID
licenses = ["Apache-2.0"]
vcsUrl = "https://github.com/47deg/hood.git"
}
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier = "javadoc"
from javadoc.destinationDir
}
6 changes: 3 additions & 3 deletions deploy-scripts/deploy.sh
Original file line number Diff line number Diff line change
@@ -7,9 +7,9 @@ if [ "$TRAVIS_BRANCH" == "master" ]; then
if [[ "$VERSION_NAME" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Starting script for Release $VERSION_NAME"
. $(dirname $0)/deploy_release.sh
# elif [[ "$VERSION_NAME" == *-SNAPSHOT ]]; then
# echo "Starting script for Snapshot Release $VERSION_NAME"
# . $(dirname $0)/deploy_snapshot.sh
elif [[ "$VERSION_NAME" == *-SNAPSHOT ]]; then
echo "Starting script for Snapshot $VERSION_NAME"
. $(dirname $0)/deploy_snapshot.sh
else
echo "No deploy script matched version '$VERSION_NAME' on master"
fi
30 changes: 26 additions & 4 deletions deploy-scripts/deploy_common.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,30 @@
#!/usr/bin/env bash
. $(dirname $0)/deploy_functions.sh
set -e

SLUG="47deg/hood"
JDK="oraclejdk8"
function getProperty {
PROP_KEY=$1
PROP_VALUE=`cat gradle.properties | grep -e "^$PROP_KEY=" | cut -d'=' -f2`
echo $PROP_VALUE
}

function fail {
echo "$1"
exit -1
}

SLUG="47degrees/hood"
BRANCH="master"
VERSION_NAME=$(getProperty "version")

#
# If 'release_version' isn't published in Gradle Plugin Portal, 'version' value is replaced by 'release_version' value
#
RELEASE_VERSION=$(getProperty "release_version")
LATEST_PUBLISHED_VERSION=$(curl https://plugins.gradle.org/m2/com/47deg/hood/maven-metadata.xml | grep latest | cut -d'>' -f2 | cut -d'<' -f1)
if [ "$RELEASE_VERSION" != "$LATEST_PUBLISHED_VERSION" ]; then
sed -i "s/version=.*/version=$RELEASE_VERSION/g" gradle.properties
echo 'apply from: rootProject.file("gradle/gradle-publish-plugin.gradle")' >> build.gradle
else
echo 'apply from: rootProject.file("gradle/gradle-mvn-push.gradle")' >> build.gradle
fi

VERSION_NAME=$(getProperty "version")
12 changes: 0 additions & 12 deletions deploy-scripts/deploy_functions.sh

This file was deleted.

7 changes: 2 additions & 5 deletions deploy-scripts/deploy_release.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
#!/usr/bin/env bash
. $(dirname $0)/deploy_common.sh

VERSION_PATTERN=^[0-9]+\.[0-9]+\.[0-9]+$

echo "Deploying release '$VERSION_NAME' ..."

if [ "$TRAVIS_REPO_SLUG" != "$SLUG" ]; then
fail "Failed release deployment: wrong repository. Expected '$SLUG' but was '$TRAVIS_REPO_SLUG'."
elif [ "$TRAVIS_JDK_VERSION" != "$JDK" ]; then
fail "Failed release deployment: wrong JDK. Expected '$JDK' but was '$TRAVIS_JDK_VERSION'."
elif [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
fail "Failed release deployment: was pull request."
elif [ "$TRAVIS_BRANCH" != "$BRANCH" ]; then
fail "Failed release deployment: wrong branch. Expected '$BRANCH' but was '$TRAVIS_BRANCH'."
elif ! [[ "$VERSION_NAME" =~ $VERSION_PATTERN ]]; then
fail "Failed release deployment: wrong version. Expected '$VERSION_NAME' to have pattern 'X.Y.Z'"
else
./gradlew bintrayUpload
./gradlew -Dgradle.publish.key=$GRADLE_PUBLISH_KEY -Dgradle.publish.secret=$GRADLE_PUBLISH_SECRET publishPlugins
echo "Release '$VERSION_NAME' deployed!"
fi
fi
7 changes: 2 additions & 5 deletions deploy-scripts/deploy_snapshot.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
#!/usr/bin/env bash
. $(dirname $0)/deploy_common.sh

VERSION_PATTERN=^[0-9]+\.[0-9]+\.[0-9]+-SNAPSHOT$

echo "Deploying snapshot '$VERSION_NAME' ..."

if [ "$TRAVIS_REPO_SLUG" != "$SLUG" ]; then
fail "Failed snapshot deployment: wrong repository. Expected '$SLUG' but was '$TRAVIS_REPO_SLUG'."
elif [ "$TRAVIS_JDK_VERSION" != "$JDK" ]; then
fail "Failed snapshot deployment: wrong JDK. Expected '$JDK' but was '$TRAVIS_JDK_VERSION'."
elif [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
fail "Failed snapshot deployment: was pull request."
elif [ "$TRAVIS_BRANCH" != "$BRANCH" ]; then
fail "Failed snapshot deployment: wrong branch. Expected '$BRANCH' but was '$TRAVIS_BRANCH'."
elif ! [[ "$VERSION_NAME" =~ $VERSION_PATTERN ]]; then
echo "Skipping snapshot deployment '$VERSION_NAME': This is probably a pre-release build"
else
./gradlew bintrayUpload
./gradlew publish
echo "Snapshot '$VERSION_NAME' deployed!"
fi
fi
Loading