Skip to content

Commit ed3fc75

Browse files
Merge pull request #81 from hypercube1024/firefly-4.9.5_release
Firefly 4.9.5 release
2 parents 4e728e7 + 6d94cbb commit ed3fc75

File tree

107 files changed

+848
-366
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+848
-366
lines changed

README.md

Lines changed: 3 additions & 3 deletions

firefly-boot/pom.xml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<parent>
1313
<artifactId>firefly-framework</artifactId>
1414
<groupId>com.fireflysource</groupId>
15-
<version>4.9.4</version>
15+
<version>4.9.5</version>
1616
</parent>
1717

1818
<dependencies>
@@ -42,9 +42,17 @@
4242
<defaultGoal>install</defaultGoal>
4343
<resources>
4444
<resource>
45-
<directory>src/main/resources</directory>
45+
<directory>src/main/resources/template</directory>
4646
<filtering>false</filtering>
4747
</resource>
48+
<resource>
49+
<directory>src/main/resources</directory>
50+
<filtering>true</filtering>
51+
<includes>
52+
<include>**/*.xml</include>
53+
<include>**/*.properties</include>
54+
</includes>
55+
</resource>
4856
</resources>
4957
<testResources>
5058
<testResource>

firefly-boot/src/main/java/com/firefly/boot/common/ExampleLogFormatter.java renamed to firefly-boot/src/main/java/com/firefly/boot/common/BootLogFormatter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/**
1111
* @author Pengtao Qiu
1212
*/
13-
public class ExampleLogFormatter implements LogFormatter {
13+
public class BootLogFormatter implements LogFormatter {
1414

1515
@Override
1616
public String format(LogItem logItem) {

firefly-boot/src/main/kotlin/com/firefly/boot/model/Project.kt

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
package com.firefly.boot.model
22

33
import com.beust.jcommander.Parameter
4+
import com.firefly.boot.model.PropertiesLoader.properties
45
import com.firefly.kotlin.ext.annotation.NoArg
56
import com.firefly.utils.ProjectVersion
7+
import java.util.*
68

79
/**
810
* @author Pengtao Qiu
@@ -48,9 +50,6 @@ data class Project(
4850
)
4951
var outputPath: String = ".",
5052

51-
@Parameter(names = ["--fireflyVersion", "-f"], description = "The firefly version.", order = 8)
52-
var fireflyVersion: String = ProjectVersion.getValue(),
53-
5453
@Parameter(
5554
names = ["--buildTool", "-b"],
5655
description = "The build tool name, the value is maven or gradle.",
@@ -62,7 +61,14 @@ data class Project(
6261
var help: Boolean = false,
6362

6463
@Parameter(names = ["--version", "-v"], description = "Show the firefly cli version.", help = true, order = 102)
65-
var version: Boolean = false
64+
var version: Boolean = false,
65+
66+
val kotlinVersion: String = properties.getProperty("kotlin.version"),
67+
val kotlinCoroutineVersion: String = properties.getProperty("kotlin.coroutine.version"),
68+
val dokkaVersion: String = properties.getProperty("dokka.version"),
69+
val jacksonVersion: String = properties.getProperty("jackson.version"),
70+
val redissonVersion: String = properties.getProperty("redisson.version"),
71+
val fireflyVersion: String = ProjectVersion.getValue()
6672
) {
6773

6874
constructor() : this(null, null, null, null, null)
@@ -78,4 +84,19 @@ enum class BuildTool(val value: String) {
7884
}
7985
}
8086

81-
}
87+
}
88+
89+
object PropertiesLoader {
90+
val properties: Properties by lazy {
91+
loadProperties("/dependency.properties")
92+
}
93+
94+
private fun loadProperties(path: String): Properties {
95+
return Project::class.java.getResourceAsStream(path).use {
96+
val properties = Properties()
97+
properties.load(it)
98+
properties
99+
}
100+
}
101+
}
102+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
kotlin.version=${kotlin.version}
2+
kotlin.coroutine.version=${kotlin.coroutine.version}
3+
dokka.version=${dokka.version}
4+
jackson.version=${jackson.version}
5+
redisson.version=${redisson.version}

firefly-boot/src/main/resources/firefly-log.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
<name>firefly-system</name>
77
<level>INFO</level>
88
<enable-console>true</enable-console>
9-
<formatter>com.firefly.boot.common.ExampleLogFormatter</formatter>
9+
<formatter>com.firefly.boot.common.BootLogFormatter</formatter>
1010
</logger>
1111

1212
<logger>
1313
<name>com.firefly.boot</name>
1414
<level>INFO</level>
1515
<enable-console>true</enable-console>
16-
<formatter>com.firefly.boot.common.ExampleLogFormatter</formatter>
16+
<formatter>com.firefly.boot.common.BootLogFormatter</formatter>
1717
</logger>
1818

1919
</loggers>

firefly-boot/src/main/resources/project_template/firefly-simple-seed/pom.xml.mustache renamed to firefly-boot/src/main/resources/template/project_template/firefly-simple-seed/pom.xml.mustache

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@
1414
<properties>
1515
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1616

17-
<kotlin.version>1.3.0</kotlin.version>
18-
<kotlin.coroutine.version>1.0.1</kotlin.coroutine.version>
17+
<kotlin.version>{{kotlinVersion}}</kotlin.version>
18+
<kotlin.coroutine.version>{{kotlinCoroutineVersion}}</kotlin.coroutine.version>
1919
<kotlin.compiler.incremental>false</kotlin.compiler.incremental>
2020
<kotlin.compiler.jvmTarget>1.8</kotlin.compiler.jvmTarget>
2121
<kotlin.compiler.languageVersion>1.3</kotlin.compiler.languageVersion>
2222
<kotlin.compiler.apiVersion>1.3</kotlin.compiler.apiVersion>
2323
<kotlin.code.style>official</kotlin.code.style>
2424

25-
<dokka.version>0.9.17</dokka.version>
25+
<dokka.version>{{dokkaVersion}}</dokka.version>
2626
<dokka.config.noStdlibLink>true</dokka.config.noStdlibLink>
2727
<dokka.config.jdkVersion>8</dokka.config.jdkVersion>
2828

2929
<firefly.version>{{fireflyVersion}}</firefly.version>
30-
<jackson.version>2.9.7</jackson.version>
31-
<redisson.version>3.9.0</redisson.version>
30+
<jackson.version>{{jacksonVersion}}</jackson.version>
31+
<redisson.version>{{redissonVersion}}</redisson.version>
3232
</properties>
3333

3434
<dependencyManagement>

0 commit comments

Comments
 (0)