Skip to content
This repository has been archived by the owner on Apr 11, 2021. It is now read-only.

Push to dev #30

Merged
merged 23 commits into from
Feb 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
d4ade34
refactor(core): refactor methods and classes [skip ci]
Jan 26, 2019
375dd7b
refactor(core): refactor more models to removes Lombok stuffs [skip ci]
Jan 27, 2019
bdaa4b7
feat(core): adding test units for HttpClient [skip ci]
Jan 27, 2019
1557b3e
refactor(core): refactor classes to Kotlin data class [skip ci]
Jan 27, 2019
ebaaae9
refactor(core): adding partial Kotlin support [skip ci]
Jan 27, 2019
195c46b
refactor(kraken): Kraken refactor [skip ci]
Jan 31, 2019
be073ce
refactor(core): Core refactor [skip ci]
Jan 31, 2019
a44b67d
refactor(core): Core updates [skip ci]
Feb 2, 2019
1b398e3
refactor(helix): Helix refactors [skip ci]
Feb 2, 2019
22875b2
perf: optimize imports [skip ci]
Feb 2, 2019
74050ce
refactor(chat): Refactor chat base [skip ci]
Feb 10, 2019
85b2c85
feat(core): Adding Reactive WebSocket Client [skip ci]
Feb 10, 2019
d41fab6
build(gradle): optimize imports + bumping versions [skip ci]
Feb 10, 2019
9106c47
refactor(*): Code cleaning [skip ci]
Feb 10, 2019
7a91fa5
refactor(pubsub): Refactor pubsub
Feb 10, 2019
42d1508
refactor(*): Reformat code
Feb 10, 2019
6efe949
fix(kraken): fixing JDK11 package missing
Feb 10, 2019
4502d3b
refactor(pubsub): Updating PubSub
Feb 11, 2019
0bc96ff
revert(4502d3b1): refactor(pubsub): Updating PubSub
Feb 11, 2019
a1c29e2
perf(*): adding java.time converters
Feb 11, 2019
fc59c36
fix(pubsub): adding missing classes
Feb 11, 2019
45740c6
perf(pubsub): adding adapters to builder
Feb 11, 2019
1e92bb2
perf(*): final shape to release
Feb 11, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
38 changes: 19 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
language: java
jdk:
- openjdk8
- openjdk11
- openjdk8
- openjdk11

before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/

cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/

before_install: chmod +x ./gradlew

before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script: ./gradlew check
after_script: ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT

jobs:
include:
- stage: deploy
jdk: openjdk11
install: chmod +x ./javadoc.sh
script: ./javadoc.sh
if: tag IS present
- stage: deploy
jdk: openjdk8
install: skip
script: ./gradlew bintrayUpload -x test
if: tag IS present
- stage: deploy
jdk: openjdk11
install: chmod +x ./javadoc.sh
script: ./javadoc.sh
if: tag IS present
- stage: deploy
jdk: openjdk8
install: skip
script: ./gradlew bintrayUpload -x test
if: tag IS present
36 changes: 36 additions & 0 deletions all/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import java.util.stream.Collectors

def projectList = rootProject.subprojects.stream().filter {
!["bom", "auth", name].contains(it.name)
}.collect(Collectors.toSet())

dependencies {
projectList.each {
compile(it)
}
}

sourceJar.enabled = false

javadoc {
failOnError false
title = "Gltich ${rootProject.version} API"

options {
windowTitle = "Glitch ${rootProject.version}"
addStringOption "Xdoclint:none", "-quiet"
author true
}
projectList.each {
source += it.javadoc.source
classpath += it.javadoc.classpath
excludes += it.javadoc.excludes
includes += it.javadoc.includes
}
}

dokka {
moduleName = rootProject.name
sourceDirs = projectList.stream().flatMap { it.dokka.sourceDirs.stream() }.collect(Collectors.toList())
sourceRoots = projectList.stream().flatMap { it.dokka.sourceRoots.stream() }.collect(Collectors.toList())
}
3 changes: 0 additions & 3 deletions auth/build.gradle

This file was deleted.

File renamed without changes.
1 change: 0 additions & 1 deletion BOM/build.gradle → bom/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ javadoc.enabled = false
tasks.withType(Jar) {
enabled false
}
delombok.enabled = false
test.enabled = false

dependencyManagement {
Expand Down
206 changes: 188 additions & 18 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,28 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

import java.text.SimpleDateFormat

plugins {
id "net.ltgt.apt" version "0.19"
id "com.jfrog.bintray" version "1.8.4"
id "de.lukaskoerfer.gradle.delombok" version "0.2"
id "org.jetbrains.dokka" version "0.9.17"
id "org.jetbrains.kotlin.jvm" version "1.3.21"
id "com.github.ben-manes.versions" version "0.20.0"
id 'com.github.johnrengelman.shadow' version "4.0.3"
id "com.gorylenko.gradle-git-properties" version "2.0.0" apply false
}

allprojects {
apply plugin: "net.ltgt.apt"
apply plugin: "net.ltgt.apt-idea"
apply plugin: "net.ltgt.apt-eclipse"
apply plugin: "de.lukaskoerfer.gradle.delombok"
def timestamp() {
def sdf = new SimpleDateFormat("MMM dd yyyy HH:mm:ss zzz", Locale.ENGLISH)
sdf.setTimeZone(TimeZone.getTimeZone("GMT"))
return sdf.format(new Date())
}

def bintrayUser = System.getenv("BINTRAY_USER") ?: findProperty("bintray.user").toString()
def bintrayApiKey = System.getenv("BINTRAY_API_KEY") ?: findProperty("bintray.api_key").toString()
def sonatypeUser = System.getenv("CENTRAL_USER") ?: findProject("central.user").toString()
def sonatypePassword = System.getenv("CENTRAL_PASSWORD") ?: findProject("central.password").toString()

allprojects {
repositories {
jcenter()
}
Expand All @@ -18,44 +31,201 @@ allprojects {
subprojects {
apply plugin: "java"
apply plugin: "maven-publish"
apply plugin: "com.jfrog.bintray"
apply plugin: "org.jetbrains.dokka"
apply plugin: "org.jetbrains.kotlin.jvm"


tasks.withType(JavaCompile) {
options.incremental = true
options.encoding = "UTF-8"
}

if (project.name != "docs") {
archivesBaseName = "${rootProject.name.toLowerCase()}-${project.name.replace(':', '-')}"
tasks.withType(KotlinCompile) {
incremental = true
kotlinOptions.jvmTarget = "1.8"
}


archivesBaseName = "${rootProject.name.toLowerCase()}-${project.name.replace(':', '-')}"
sourceCompatibility = targetCompatibility = 1.8

dependencies {
if (project.name != "BOM" && project.name != "docs") {
// https://docs.gradle.org/5.0/userguide/managing_transitive_dependencies.html#sec:bom_import
compile enforcedPlatform("io.projectreactor:reactor-bom:Californium-SR3")
if (!["bom", "all", "auth", rootProject.name].contains(project.name)) {
compile enforcedPlatform("io.projectreactor:reactor-bom:Californium-SR4")

compile "org.slf4j:slf4j-api:1.7.25"
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
compile "org.jetbrains.kotlin:kotlin-reflect"

compileOnly "org.projectlombok:lombok:1.18.4"
annotationProcessor "org.projectlombok:lombok:1.18.4"
compile "org.slf4j:slf4j-api:1.7.25"

testCompile "ch.qos.logback:logback-classic:1.2.3"

testCompile "io.projectreactor:reactor-test"
}
}

apply from: "${rootDir}/gradle/deploy.gradle"
jar {
manifest {
attributes([
'Manifest-Version' : '1.0',
'Created-By' : "Gradle ${gradle.gradleVersion} - JDK ${System.getProperty("java.specification.version")} (${System.getProperty("java.version")})",
'Implementation-Title' : rootProject.name,
'Implementation-Vendor' : archivesBaseName,
'Implementation-Version': version,
'Implementation-Date' : timestamp()
])
}
}

dokka {
moduleName = archivesBaseName
jdkVersion = 8
}

javadoc {
options {
encoding = "UTF-8"
}
exclude "**/*Impl.java"
exclude "**/GsonAdapters*.java"
}

task sourceJar(type: Jar, dependsOn: classes, description: 'Builds the sources jar.', group: 'build') {
from sourceSets.main.allSource
classifier "sources"
}

task javadocJar(type: Jar, dependsOn: javadoc, description: 'Builds the javadoc jar.', group: 'build') {
from javadoc.outputDirectory
classifier "javadoc"
}

task kdocJar(type: Jar, dependsOn: javadoc, description: 'Builds the kotlin-doc jar.', group: 'build') {
dependsOn dokka
from dokka.outputDirectory
classifier "kdoc"
}

task dependecySize {
if (["bom", "auth"].contains(project.name)) {
enabled = false
}
doLast {
def size = 0
def formatStr = "%,10.2f"
configurations.default.collect { it.length() / (1024 * 1024) }.each { size += it }

def out = new StringBuffer()
out << 'Total dependencies size:'.padRight(45)
out << "${String.format(formatStr, size)} MiB\n\n"

configurations
.default
.sort { -it.length() }
.each {
out << "${it.name}".padRight(45)
out << "${String.format(formatStr, (it.length() / 1024))} KiB\n"
}
println(out)
}
}

if (project.name != "bom") {
artifacts {
if (project.name != "all") {
archives sourceJar
}
archives javadocJar
archives kdocJar
}
}

publishing {
publications {
maven(MavenPublication) {
artifactId = archivesBaseName
if (project.name != "bom") {
if (project.name != "all") {
from components.java
artifact sourceJar
}
artifact javadocJar
artifact kdocJar
}

pom {
url = "https://glitchlib.github.io/"
issueManagement {
system = 'GitHub'
url = 'https://github.com/glitchlib/glitch/issues'
}
ciManagement {
system = "Travis-CI"
url = "https://travis-ci.com/GlitchLib/glitch"
}
inceptionYear = "2018"
developers {
developer {
id = "stachu540"
name = "Damian Staszewski"
url = "https://github.com/stachu540"
timezone = "Europe/Warsaw"
}
}
licenses {
license {
name = "MIT"
url = "https://github.com/GlitchLib/glitch/blob/master/LICENCE.md"
distribution = "repo"
}
}
scm {
connection = "scm:git:https://github.com/glitchlib/glitch.git"
developerConnection = "scm:git:[email protected]:glitchlib/glitch.git"
url = "https://github.com/glitchlib/glitch"
}
distributionManagement {
downloadUrl = "https://github.com/glitchlib/glitch/releases"
}
}
}
}
}

bintray {
user = bintrayUser
key = bintrayApiKey
publications = ["maven"]
dryRun = false
publish = true
override = false
pkg {
userOrg = bintrayUser
repo = "GlitchLib"
name = "Glitch"
desc = "Java API Wrapper for Twitch"
licenses = ["MIT"]
publicDownloadNumbers = true
vcsUrl = "https://github.com/GlitchLib/glitch.git"
version {
name = rootProject.version.toString()
vcsTag = "v${rootProject.version}"
released = Calendar.getInstance(TimeZone.getTimeZone("GMT")).time.toInstant().toString()
}
}
}

test {
useJUnitPlatform()
shouldRunAfter dependecySize
}

}

rootProject.bintrayUpload.enabled = false
rootProject.bintrayPublish.enabled = false

wrapper {
gradleVersion = "5.0"
gradleVersion = "5.2.1"
distributionType = Wrapper.DistributionType.ALL
}
2 changes: 2 additions & 0 deletions chat/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
dependencies {
compileOnly project(":core")
compileOnly project(":kraken")

testCompile project(":core")
testCompile project(":kraken")
}
26 changes: 26 additions & 0 deletions chat/src/main/java/glitch/chat/Colors.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package glitch.chat;

import java.awt.Color;

/**
* @author Damian Staszewski [[email protected]]
* @version %I%, %G%
* @since 1.0
*/
public class Colors {
public static Color Red = Color.decode("#FF0000");
public static Color Blue = Color.decode("#0000FF");
public static Color Green = Color.decode("#00FF00");
public static Color FireBrick = Color.decode("#B22222");
public static Color Coral = Color.decode("#FF7F50");
public static Color YellowGreen = Color.decode("#9ACD32");
public static Color OrangeRed = Color.decode("#FF4500");
public static Color SeaGreen = Color.decode("#2E8B57");
public static Color GoldenRod = Color.decode("#DAA520");
public static Color Chocolate = Color.decode("#D2691E");
public static Color CadetBlue = Color.decode("#5F9EA0");
public static Color DodgerBlue = Color.decode("#1E90FF");
public static Color HotPink = Color.decode("#FF69B4");
public static Color BlueViolet = Color.decode("#8A2BE2");
public static Color SpringGreen = Color.decode("#00FF7F");
}
Loading