Skip to content

Commit cb24ebb

Browse files
committed
Updated to Kobalt 1.0.45
1 parent 80302ce commit cb24ebb

File tree

8 files changed

+205
-25
lines changed

8 files changed

+205
-25
lines changed

.gitattributes

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Set the default behavior, in case people don't have core.autocrlf set.
2+
* text=auto
3+
4+
# batch files are specific to windows and always crlf
5+
*.bat eol=crlf

.gitignore

+7-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
**/.idea/tasks.xml
55
**/.idea/workspace.xml
66
*.iws
7-
.DS_Store
87
.classpath
8+
.DS_Store
99
.gradle
10+
.kobalt
1011
.nb-gradle
1112
.project
1213
.settings
@@ -16,15 +17,18 @@
1617
/dist
1718
/fetcher.properties
1819
/gen
20+
/gradle.properties
1921
/local.properties
2022
/log4j.properties
2123
/logs
2224
/mobibot.properties
2325
/out
2426
/proguard-project.txt
2527
/project.properties
28+
/target
2629
/test-output
2730
/weather.log
2831
CVS
29-
Thumbs.db
30-
ehthumbs.db
32+
ehthumbs.db
33+
kobaltBuild
34+
Thumbs.db

.idea/modules/mobibot.iml

+89-22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

kobalt/src/Build.kt

+97
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
import com.beust.kobalt.*
2+
import com.beust.kobalt.plugin.apt.*
3+
import com.beust.kobalt.plugin.packaging.*
4+
import com.beust.kobalt.plugin.application.*
5+
import com.beust.kobalt.plugin.java.*
6+
import java.io.File
7+
import java.io.FileInputStream
8+
import java.util.*
9+
10+
val bs = buildScript {
11+
repos()
12+
}
13+
14+
val mainClassName = "net.thauvin.erik.mobibot.Mobibot"
15+
16+
fun StringBuilder.prepend(s: String): StringBuilder {
17+
if (this.isNotEmpty()) {
18+
this.insert(0, s)
19+
}
20+
return this
21+
}
22+
23+
val p = project {
24+
25+
name = "mobibot"
26+
27+
fun versionFor(): String {
28+
val propsFile = "version.properties"
29+
val majorKey = "version.major"
30+
val minorKey = "version.minor"
31+
val patchKey = "version.patch"
32+
val metaKey = "version.buildmeta"
33+
val preKey = "version.prerelease"
34+
35+
val p = Properties().apply { FileInputStream(propsFile).use { fis -> load(fis) } }
36+
37+
return (p.getProperty(majorKey, "1") + "." + p.getProperty(minorKey, "0") + "." + p.getProperty(patchKey, "0")
38+
+ StringBuilder(p.getProperty(preKey, "")).prepend("-")
39+
+ StringBuilder(p.getProperty(metaKey, "")).prepend("+"))
40+
}
41+
42+
version = versionFor()
43+
44+
val processorJar = "net.thauvin.erik:semver:"
45+
46+
dependencies {
47+
compile("log4j:log4j:jar:1.2.17")
48+
49+
compile("pircbot:pircbot:1.5.0")
50+
51+
compile("commons-codec:commons-codec:1.10")
52+
compile("commons-logging:commons-logging:1.2")
53+
compile("commons-net:commons-net:3.5")
54+
compile("commons-cli:commons-cli:1.3.1")
55+
compile("commons-httpclient:commons-httpclient:3.1")
56+
57+
compile("oro:oro:2.0.8")
58+
59+
compile("org.jsoup:jsoup:1.9.2")
60+
compile("com.rometools:rome:1.6.1")
61+
compile("org.slf4j:slf4j-log4j12:1.7.21")
62+
compile("org.json:json:20160212")
63+
compile("org.ostermiller:utils:1.07.00")
64+
65+
compile("net.sourceforge.jweather:jweather:jar:0.3.0")
66+
compile("net.objecthunter:exp4j:0.4.7")
67+
68+
compile("org.twitter4j:twitter4j-core:4.0.4")
69+
compile("net.sf.delicious-java:delicious:1.14")
70+
71+
apt(processorJar)
72+
compile(processorJar)
73+
}
74+
75+
apt {
76+
outputDir = "/src/generated/java/"
77+
}
78+
79+
assemble {
80+
jar {
81+
name = "${project.name}.jar"
82+
fatJar = true
83+
manifest {
84+
attributes("Main-Class", mainClassName)
85+
}
86+
}
87+
}
88+
89+
application {
90+
mainClass = mainClassName
91+
args("-v")
92+
}
93+
94+
install {
95+
libDir = "deploy"
96+
}
97+
}

kobalt/wrapper/kobalt-wrapper.jar

11 KB
Binary file not shown.
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
kobalt.version=1.0.45

kobaltw

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env sh
2+
java -jar "`dirname "$0"`/kobalt/wrapper/kobalt-wrapper.jar" $*

kobaltw.bat

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@echo off
2+
set DIRNAME=%~dp0
3+
if "%DIRNAME%" == "" set DIRNAME=.
4+
java -jar "%DIRNAME%/kobalt/wrapper/kobalt-wrapper.jar" %*

0 commit comments

Comments
 (0)