Skip to content

Commit

Permalink
refactor: Remove slf4j as dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
aalmiray committed Feb 8, 2023
1 parent f42fea8 commit 411a524
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 39 deletions.
4 changes: 0 additions & 4 deletions core/jarviz-core/jarviz-core.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ config {
}
}

dependencies {
api "org.slf4j:jcl-over-slf4j:$slf4jVersion"
}

project.rootProject.gradle.addBuildListener(new BuildAdapter() {
@Override
void projectsEvaluated(Gradle gradle) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
*/
package org.kordamp.jarviz.bundle;

import org.slf4j.helpers.MessageFormatter;

import java.text.MessageFormat;
import java.util.ResourceBundle;

/**
Expand All @@ -36,6 +35,6 @@ private RB() {
if (null == args || args.length == 0) {
return BUNDLE.getString(key);
}
return MessageFormatter.arrayFormat(BUNDLE.getString(key), args).getMessage();
return MessageFormat.format(BUNDLE.getString(key), args);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@
# limitations under the License.
#

ERROR_PATH_DOES_NOT_EXIST = [JARVIZ-000] Path does not exist: {}
ERROR_PATH_IS_NOT_A_FILE = [JARVIZ-001] Path is not a file: {}
ERROR_PATH_IS_NOT_READABLE = [JARVIZ-002] Path is not readable: {}
ERROR_PATH_IS_NOT_JAR = [JARVIZ-003] Path is not a JAR file: {}
ERROR_INVALID_GAV = [JARVIZ-004] Invalid GAV coordinates: {}
ERROR_INVALID_URL = [JARVIZ-005] Invalid URL: {}
ERROR_OPENING_JAR = [JARVIZ-006] Error while opening JAR file: {}
ERROR_DOWNLOADING_URL = [JARVIZ-007] Error while downloading URL: {}
ERROR_READING_JAR_MANIFEST = [JARVIZ-010] Error reading manifest from {}
ERROR_READING_JAR_ENTRY = [JARVIZ-011] Error reading entry {} from {}
ERROR_CREATE_DIRECTORY = [JARVIZ-900] Could not create directory {}
ERROR_PATH_DOES_NOT_EXIST = [JARVIZ-000] Path does not exist: {0}
ERROR_PATH_IS_NOT_A_FILE = [JARVIZ-001] Path is not a file: {0}
ERROR_PATH_IS_NOT_READABLE = [JARVIZ-002] Path is not readable: {0}
ERROR_PATH_IS_NOT_JAR = [JARVIZ-003] Path is not a JAR file: {0}
ERROR_INVALID_GAV = [JARVIZ-004] Invalid GAV coordinates: {0}
ERROR_INVALID_URL = [JARVIZ-005] Invalid URL: {0}
ERROR_OPENING_JAR = [JARVIZ-006] Error while opening JAR file: {0}
ERROR_DOWNLOADING_URL = [JARVIZ-007] Error while downloading URL: {0}
ERROR_READING_JAR_MANIFEST = [JARVIZ-010] Error reading manifest from {0}
ERROR_READING_JAR_ENTRY = [JARVIZ-011] Error reading entry {0} from {0}
ERROR_CREATE_DIRECTORY = [JARVIZ-900] Could not create directory {0}
ERROR_UNEXPECTED_WRITE = [JARVIZ-901] Unexpected error when writing to out
ERROR_UNEXPECTED = [JARVIZ-902] Unexpected error

ERROR_WRITE_FILE = Could not write to {}
ERROR_WRITE_FILE = Could not write to {0}
4 changes: 1 addition & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,11 @@ moditectPluginVersion = 1.0.0-rc3

asmVersion = 9.4
checkstyleVersion = 10.5.0
commonsIoVersion = 2.11.0
hamcrestVersion = 2.2
jipsyVersion = 1.1.1
junitVersion = 4.13.2
junit5Version = 5.9.1
junit5Version = 5.9.2
picocliVersion = 4.7.1
slf4jVersion = 2.0.5

org.gradle.daemon = true
org.gradle.caching = true
Expand Down
1 change: 0 additions & 1 deletion plugins/jarviz-cli/jarviz-cli.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ dependencies {
api project(':jarviz-core')
annotationProcessor "info.picocli:picocli-codegen:$picocliVersion"
api "info.picocli:picocli:$picocliVersion"
runtimeOnly "org.slf4j:slf4j-simple:$slf4jVersion"
}

processResources {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
*/
package org.kordamp.jarviz.cli;

import org.slf4j.helpers.MessageFormatter;
import picocli.CommandLine;

import java.text.MessageFormat;
import java.util.Map;
import java.util.ResourceBundle;

Expand Down Expand Up @@ -54,6 +54,6 @@ void setProperty(Map<String, String> props) {
if (null == args || args.length == 0) {
return bundle.getString(key);
}
return MessageFormatter.arrayFormat(bundle.getString(key), args).getMessage();
return MessageFormat.format(bundle.getString(key), args);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -152,27 +152,27 @@ jarviz.services.show.usage.header = Display service implementations.
# Reports
###############################################################################

bytecode.version.attribute = @|yellow Bytecode-Version|@: {}
bytecode.unversioned.classes.total = @|yellow Unversioned classes. Bytecode version|@: @|cyan {}|@ @|yellow total|@: @|cyan {}|@
bytecode.versioned.classes.total = @|yellow Versioned classes|@ @|cyan {}|@. @|yellow Bytecode version|@: @|cyan {}|@ @|yellow total|@: @|cyan {}|@
module.name = @|yellow name|@: {}
module.version = @|yellow version|@: {}
module.source = @|yellow source|@: {}
module.open = @|yellow open|@: {}
module.automatic = @|yellow automatic|@: {}
module.valid = @|yellow valid|@: {}
module.reason = @|yellow reason|@: {}
module.main.class = @|yellow main-class|@: {}
bytecode.version.attribute = @|yellow Bytecode-Version|@: {0}
bytecode.unversioned.classes.total = @|yellow Unversioned classes. Bytecode version|@: @|cyan {0}|@ @|yellow total|@: @|cyan {1}|@
bytecode.versioned.classes.total = @|yellow Versioned classes|@ @|cyan {0}|@. @|yellow Bytecode version|@: @|cyan {1}|@ @|yellow total|@: @|cyan {2}|@
module.name = @|yellow name|@: {0}
module.version = @|yellow version|@: {0}
module.source = @|yellow source|@: {0}
module.open = @|yellow open|@: {0}
module.automatic = @|yellow automatic|@: {0}
module.valid = @|yellow valid|@: {0}
module.reason = @|yellow reason|@: {0}
module.main.class = @|yellow main-class|@: {0}
module.exports = @|yellow exports|@:
module.exports.qualified = @|yellow qualified exports|@:
module.exports.to = {} @|yellow to|@{}
module.exports.to = {0} @|yellow to|@{1}
module.requires = @|yellow requires|@:
module.opens = @|yellow opens|@:
module.opens.qualified = @|yellow qualified opens|@:
module.uses = @|yellow uses|@:
module.provides = @|yellow provides|@:
module.provides.with = {} @|yellow with|@{}
module.opens.to = {} @|yellow to|@{}
module.provides.with = {0} @|yellow with|@{1}
module.opens.to = {0} @|yellow to|@{1}
module.contains = @|yellow contains|@:

report.key.jarviz = jarviz
Expand Down

0 comments on commit 411a524

Please sign in to comment.