-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Refactor into separate libraries to avoid requiring specific c…
…onnector implementations
- Loading branch information
1 parent
aae2510
commit c6cee4a
Showing
82 changed files
with
457 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,114 +1,5 @@ | ||
plugins { | ||
id 'java-library' | ||
id 'jacoco' | ||
id 'maven-publish' | ||
id 'checkstyle' | ||
id 'signing' | ||
} | ||
|
||
group = 'io.github.blackspherefollower' | ||
version = "3.0." + ("${System.env.GITHUB_RUN_NUMBER ?: 1}") + ("${System.env.GITHUB_REF_TYPE}" == "tag" ? "" : "-SNAPSHOT") | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
api 'jakarta.websocket:jakarta.websocket-api:2.1.1' | ||
api 'org.eclipse.jetty.websocket:websocket-javax-client:10.0.15' | ||
api 'com.fasterxml.jackson.core:jackson-annotations:2.15.2' | ||
api 'com.fasterxml.jackson.core:jackson-databind:2.15.2' | ||
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.0' | ||
testImplementation 'org.eclipse.jetty.websocket:websocket-javax-server:10.0.15' | ||
} | ||
|
||
java { | ||
toolchain { | ||
languageVersion = JavaLanguageVersion.of(11) | ||
} | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
checkstyle { | ||
configFile = file("${rootDir}/checkstyle.xml") | ||
showViolations = false | ||
ignoreFailures = true | ||
} | ||
test { | ||
finalizedBy jacocoTestReport | ||
finalizedBy check | ||
} | ||
jacocoTestReport { | ||
dependsOn test | ||
} | ||
tasks.named('test') { | ||
useJUnitPlatform() | ||
} | ||
|
||
jacocoTestReport { | ||
reports { | ||
xml.required = true | ||
csv.required = true | ||
} | ||
} | ||
|
||
publishing { | ||
repositories { | ||
maven { | ||
name = "GitHubPackages" | ||
url = uri("https://maven.pkg.github.com/${System.env.GITHUB_REPOSITORY}") | ||
credentials { | ||
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_ACTOR") | ||
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN") | ||
} | ||
} | ||
maven { | ||
name = "ossrh" | ||
url = version.contains("-SNAPSHOT") ? | ||
uri("https://s01.oss.sonatype.org/content/repositories/snapshots/") : | ||
uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") | ||
|
||
credentials { | ||
username = project.findProperty("maven.user") ?:System.getenv("MAVEN_USER") | ||
password = project.findProperty("maven.pass") ?:System.getenv("MAVEN_PASS") | ||
} | ||
} | ||
} | ||
publications { | ||
mavenJava(MavenPublication) { | ||
from(components.java) | ||
pom { | ||
name = 'Buttplug for Java' | ||
description = 'A pure Java Buttplug Client implementation' | ||
url = 'https://github.com/blackspherefollower/buttplug4j' | ||
inceptionYear = '2017' | ||
|
||
licenses { | ||
license { | ||
name = 'BSDv3 License' | ||
url = 'https://github.com/blackspherefollower/buttplug4j/' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'blackspherefollower' | ||
name = 'BlackSphereFollower' | ||
email = 'blackspherefollower@iostindex.com' | ||
} | ||
} | ||
scm { | ||
connection='scm:git:git:github.com/blackspherefollower/buttplug4j.git' | ||
developerConnection='scm:git:https://github.com/blackspherefollower/buttplug4j.git' | ||
url='https://github.com/blackspherefollower/buttplug4j' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
def gpgKey = project.findProperty("gpg.key") ?: System.getenv("OSSRH_GPG") ?: "" | ||
def gpgPass = project.findProperty("gpg.pass") ?: System.getenv("OSSRH_GPG_PASS") ?: "" | ||
useInMemoryPgpKeys(gpgKey.replaceAll("\\\\n", "\n"), gpgPass) | ||
sign publishing.publications.mavenJava | ||
} | ||
subprojects { | ||
group = 'io.github.blackspherefollower' | ||
version = "3.1." + ("${System.env.GITHUB_RUN_NUMBER ?: 1}") + ("${System.env.GITHUB_REF_TYPE}" == "tag" ? "" : "-SNAPSHOT") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
plugins { | ||
id 'java-library' | ||
id 'jacoco' | ||
id 'maven-publish' | ||
id 'checkstyle' | ||
id 'signing' | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
api 'com.fasterxml.jackson.core:jackson-annotations:2.15.1' | ||
api 'com.fasterxml.jackson.core:jackson-databind:2.15.1' | ||
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.0' | ||
} | ||
|
||
java { | ||
toolchain { | ||
languageVersion = JavaLanguageVersion.of(8) | ||
} | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
checkstyle { | ||
configFile = file("${rootDir}/checkstyle.xml") | ||
showViolations = false | ||
ignoreFailures = true | ||
} | ||
test { | ||
finalizedBy jacocoTestReport | ||
finalizedBy check | ||
} | ||
jacocoTestReport { | ||
dependsOn test | ||
} | ||
tasks.named('test') { | ||
useJUnitPlatform() | ||
} | ||
|
||
jacocoTestReport { | ||
reports { | ||
xml.required = true | ||
csv.required = true | ||
} | ||
} | ||
|
||
publishing { | ||
repositories { | ||
maven { | ||
name = "GitHubPackages" | ||
url = uri("https://maven.pkg.github.com/${System.env.GITHUB_REPOSITORY}") | ||
credentials { | ||
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_ACTOR") | ||
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN") | ||
} | ||
} | ||
maven { | ||
name = "ossrh" | ||
url = version.contains("-SNAPSHOT") ? | ||
uri("https://s01.oss.sonatype.org/content/repositories/snapshots/") : | ||
uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") | ||
|
||
credentials { | ||
username = project.findProperty("maven.user") ?:System.getenv("MAVEN_USER") | ||
password = project.findProperty("maven.pass") ?:System.getenv("MAVEN_PASS") | ||
} | ||
} | ||
} | ||
publications { | ||
mavenJava(MavenPublication) { | ||
from(components.java) | ||
pom { | ||
name = 'Buttplug for Java' | ||
description = 'A pure Java Buttplug Client implementation' | ||
url = 'https://github.com/blackspherefollower/buttplug4j' | ||
inceptionYear = '2017' | ||
|
||
licenses { | ||
license { | ||
name = 'BSDv3 License' | ||
url = 'https://github.com/blackspherefollower/buttplug4j/' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'blackspherefollower' | ||
name = 'BlackSphereFollower' | ||
email = 'blackspherefollower@iostindex.com' | ||
} | ||
} | ||
scm { | ||
connection='scm:git:git:github.com/blackspherefollower/buttplug4j.git' | ||
developerConnection='scm:git:https://github.com/blackspherefollower/buttplug4j.git' | ||
url='https://github.com/blackspherefollower/buttplug4j' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
def gpgKey = project.findProperty("gpg.key") ?: System.getenv("OSSRH_GPG") ?: "" | ||
def gpgPass = project.findProperty("gpg.pass") ?: System.getenv("OSSRH_GPG_PASS") ?: "" | ||
useInMemoryPgpKeys(gpgKey.replaceAll("\\\\n", "\n"), gpgPass) | ||
sign publishing.publications.mavenJava | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
plugins { | ||
id 'java-library' | ||
id 'jacoco' | ||
id 'maven-publish' | ||
id 'checkstyle' | ||
id 'signing' | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
api project(':connectors:javax:wscommon') | ||
api 'org.eclipse.jetty.websocket:websocket-javax-client:10.0.15' | ||
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.0' | ||
} | ||
|
||
java { | ||
toolchain { | ||
languageVersion = JavaLanguageVersion.of(11) | ||
} | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
checkstyle { | ||
configFile = file("${rootDir}/checkstyle.xml") | ||
showViolations = false | ||
ignoreFailures = true | ||
} | ||
test { | ||
finalizedBy jacocoTestReport | ||
finalizedBy check | ||
} | ||
jacocoTestReport { | ||
dependsOn test | ||
} | ||
tasks.named('test') { | ||
useJUnitPlatform() | ||
} | ||
|
||
jacocoTestReport { | ||
reports { | ||
xml.required = true | ||
csv.required = true | ||
} | ||
} | ||
|
||
publishing { | ||
repositories { | ||
maven { | ||
name = "GitHubPackages" | ||
url = uri("https://maven.pkg.github.com/${System.env.GITHUB_REPOSITORY}") | ||
credentials { | ||
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_ACTOR") | ||
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN") | ||
} | ||
} | ||
maven { | ||
name = "ossrh" | ||
url = version.contains("-SNAPSHOT") ? | ||
uri("https://s01.oss.sonatype.org/content/repositories/snapshots/") : | ||
uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") | ||
|
||
credentials { | ||
username = project.findProperty("maven.user") ?:System.getenv("MAVEN_USER") | ||
password = project.findProperty("maven.pass") ?:System.getenv("MAVEN_PASS") | ||
} | ||
} | ||
} | ||
publications { | ||
mavenJava(MavenPublication) { | ||
from(components.java) | ||
pom { | ||
name = 'Buttplug for Java' | ||
description = 'A pure Java Buttplug Client implementation' | ||
url = 'https://github.com/blackspherefollower/buttplug4j' | ||
inceptionYear = '2017' | ||
|
||
licenses { | ||
license { | ||
name = 'BSDv3 License' | ||
url = 'https://github.com/blackspherefollower/buttplug4j/' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'blackspherefollower' | ||
name = 'BlackSphereFollower' | ||
email = 'blackspherefollower@iostindex.com' | ||
} | ||
} | ||
scm { | ||
connection='scm:git:git:github.com/blackspherefollower/buttplug4j.git' | ||
developerConnection='scm:git:https://github.com/blackspherefollower/buttplug4j.git' | ||
url='https://github.com/blackspherefollower/buttplug4j' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
def gpgKey = project.findProperty("gpg.key") ?: System.getenv("OSSRH_GPG") ?: "" | ||
def gpgPass = project.findProperty("gpg.pass") ?: System.getenv("OSSRH_GPG_PASS") ?: "" | ||
useInMemoryPgpKeys(gpgKey.replaceAll("\\\\n", "\n"), gpgPass) | ||
sign publishing.publications.mavenJava | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...ug4j/client/ButtplugWSClientMockTest.java → ...avax/client/ButtplugWSClientMockTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.