Skip to content

Commit

Permalink
Merge branch 'Annotation-Profile'
Browse files Browse the repository at this point in the history
  • Loading branch information
Minecraftian14 committed May 2, 2021
2 parents 6f27e4f + c0be551 commit 2ffc524
Show file tree
Hide file tree
Showing 14 changed files with 47 additions and 6 deletions.
Binary file modified .gradle/6.3/executionHistory/executionHistory.bin
Binary file not shown.
Binary file modified .gradle/6.3/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified .gradle/6.3/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified .gradle/6.3/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified .gradle/6.3/javaCompile/javaCompile.lock
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/outputFiles.bin
Binary file not shown.
3 changes: 2 additions & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions MyLOGGERTest/.idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions MyLOGGERTest/.idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion MyLOGGERTest/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,11 @@ dependencies {
// implementation 'com.github.Minecraftian14:MyLOGGER:f186d9c30e'
// annotationProcessor 'com.github.Minecraftian14:MyLOGGER:f186d9c30e'

// annotationProcessor fileTree(dir: 'libs', include: '*.jar')
compile fileTree(dir: 'libs', include: '*.jar')

annotationProcessor fileTree(dir: 'libs', include: '*.jar')
}

dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
}
19 changes: 15 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ java {
}

group 'com.mcxiv.logger'
version 'V3'
version 'v5.2'

repositories {
mavenCentral()
Expand All @@ -17,12 +17,23 @@ repositories {
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'

// implementation "me.eugeniomarletti.kotlin.metadata:kotlin-metadata:1.4.0"
// implementation project(':browser') //importing the other module in here, in order to handle it.
// implementation 'com.squareup:kotlinpoet:1.2.0'
implementation 'com.google.auto.service:auto-service:1.0-rc4'
annotationProcessor 'com.google.auto.service:auto-service:1.0-rc4'

// implementation project(':')
// annotationProcessor project(':')

}

jar {
from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
task fatJar(type: Jar) {
manifest {
attributes 'Implementation-Title': 'MyLOGGER',
'Implementation-Version': version
}
baseName = project.name + '-all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
1 change: 1 addition & 0 deletions src/main/java/com/mcxiv/logger/decorations/Decoration.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public Decoration(Decorations.Tag tag, String... codes) {
static Pattern re_timeFormat = Pattern.compile("[<]([\\w /;]+)[>]");
static Pattern re_wordWrap = Pattern.compile("[w]([0-9]+)[w]");
static Pattern re_splitter = Pattern.compile("[x]([^/a])[x]");
static Pattern re_wordRepeater = Pattern.compile("[r]([\\d]+)");

static Pattern re_Ccolor = Pattern.compile("[$]((?:" + map.keySet().stream().sorted((a, b) -> b.length() - a.length()).reduce("", (a, b) -> a.equals("") ? b : a + ")|(?:" + b) + "))");
static Pattern re_6color = Pattern.compile("[#]([A-Fa-f0-9]{6})");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,15 @@ public static Decorate SplittingFormattingResolver(Matcher m, String content, De
return decorate;
}

public static Decorate WordRepeaterFormattingResolver(Matcher m, String content, Decorate decorate) {
if ((m = re_wordRepeater.matcher(content)).find()) {
int len = Integer.parseInt(m.group(1));
final Decorate new_d = decorate;
return s -> new_d.decorate(Decoration.center(len, s));
}
return decorate;
}

public static class TimeResolver {
String content;
Supplier<String> supplier;
Expand Down

0 comments on commit 2ffc524

Please sign in to comment.