Skip to content

Commit

Permalink
Huge code cleanup and refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphiMC committed Oct 22, 2023
1 parent 30e4fc6 commit a25c88a
Show file tree
Hide file tree
Showing 38 changed files with 972 additions and 1,978 deletions.
25 changes: 25 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ plugins {
id "java-library"
id "maven-publish"
id "signing"
id "net.raphimc.class-token-replacer" version "1.0.0"
id "io.freefair.lombok" version "8.4"
}

base {
Expand All @@ -27,6 +29,15 @@ dependencies {
api "org.slf4j:slf4j-api:2.0.9"
}

sourceSets {
main {
classTokenReplacer {
property("\${version}", project.version)
property("\${impl_version}", "git-${project.name}-${project.version}:${project.latestCommitHash()}")
}
}
}

java {
withSourcesJar()
withJavadocJar()
Expand All @@ -38,6 +49,11 @@ jar {
}
}

sourcesJar {
from delombok
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}

artifacts {
archives javadocJar, sourcesJar
}
Expand Down Expand Up @@ -105,3 +121,12 @@ signing {
project.tasks.withType(PublishToMavenRepository).forEach {
it.dependsOn(project.tasks.withType(Sign))
}

String latestCommitHash() {
def stdout = new ByteArrayOutputStream()
exec {
commandLine "git", "rev-parse", "--short", "HEAD"
standardOutput = stdout
}
return stdout.toString().trim()
}
124 changes: 0 additions & 124 deletions src/main/java/net/raphimc/mcauth/step/java/StepGameOwnership.java

This file was deleted.

143 changes: 0 additions & 143 deletions src/main/java/net/raphimc/mcauth/step/java/StepMCProfile.java

This file was deleted.

Loading

0 comments on commit a25c88a

Please sign in to comment.