Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
a5051304
提交
a5051304
authored
9 年前
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Build: support target version
上级
59ec5233
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
26 行增加
和
9 行删除
+26
-9
Build.java
h2/src/tools/org/h2/build/Build.java
+26
-9
没有找到文件。
h2/src/tools/org/h2/build/Build.java
浏览文件 @
a5051304
...
@@ -98,11 +98,15 @@ public class Build extends BuildBase {
...
@@ -98,11 +98,15 @@ public class Build extends BuildBase {
}
}
private
void
compileTools
()
{
private
void
compileTools
()
{
mkdir
(
"temp"
);
FileList
files
=
files
(
"src/tools"
).
keep
(
"src/tools/org/h2/build/*"
);
FileList
files
=
files
(
"src/tools"
).
keep
(
"src/tools/org/h2/build/*"
);
StringList
args
=
args
(
"-d"
,
"temp"
,
"-sourcepath"
,
"src/tools"
+
StringList
args
=
args
(
"-d"
,
"temp"
,
"-sourcepath"
,
"src/tools"
+
File
.
pathSeparator
+
"src/test"
+
File
.
pathSeparator
+
"src/test"
+
File
.
pathSeparator
+
"src/main"
);
File
.
pathSeparator
+
"src/main"
);
mkdir
(
"temp"
);
String
version
=
getTargetJavaVersion
();
if
(
version
!=
null
)
{
args
=
args
.
plus
(
"-target"
,
version
);
}
javac
(
args
,
files
);
javac
(
args
,
files
);
}
}
...
@@ -147,9 +151,13 @@ public class Build extends BuildBase {
...
@@ -147,9 +151,13 @@ public class Build extends BuildBase {
switchSource
(
true
);
switchSource
(
true
);
}
}
private
static
String
getTargetJavaVersion
()
{
return
System
.
getProperty
(
"version"
);
}
private
static
void
switchSource
(
boolean
enableCheck
)
{
private
static
void
switchSource
(
boolean
enableCheck
)
{
try
{
try
{
String
version
=
System
.
getProperty
(
"version"
);
String
version
=
getTargetJavaVersion
(
);
String
check
=
enableCheck
?
"+CHECK"
:
"-CHECK"
;
String
check
=
enableCheck
?
"+CHECK"
:
"-CHECK"
;
if
(
version
==
null
)
{
if
(
version
==
null
)
{
SwitchSource
.
main
(
"-dir"
,
"src"
,
"-auto"
,
check
);
SwitchSource
.
main
(
"-dir"
,
"src"
,
"-auto"
,
check
);
...
@@ -177,6 +185,10 @@ public class Build extends BuildBase {
...
@@ -177,6 +185,10 @@ public class Build extends BuildBase {
args
=
args
.
plus
(
"-Xlint:unchecked"
,
"-g:none"
,
"-d"
,
"temp"
,
args
=
args
.
plus
(
"-Xlint:unchecked"
,
"-g:none"
,
"-d"
,
"temp"
,
"-sourcepath"
,
"src/main"
,
"-classpath"
,
classpath
);
"-sourcepath"
,
"src/main"
,
"-classpath"
,
classpath
);
}
}
String
version
=
getTargetJavaVersion
();
if
(
version
!=
null
)
{
args
=
args
.
plus
(
"-target"
,
version
);
}
javac
(
args
,
files
);
javac
(
args
,
files
);
}
}
...
@@ -203,12 +215,6 @@ public class Build extends BuildBase {
...
@@ -203,12 +215,6 @@ public class Build extends BuildBase {
files
=
files
(
"src/main"
);
files
=
files
(
"src/main"
);
}
}
StringList
args
=
args
();
StringList
args
=
args
();
if
(
System
.
getProperty
(
"version"
)
!=
null
)
{
String
bcp
=
System
.
getProperty
(
"bcp"
);
// /System/Library/Frameworks/JavaVM.framework/
// Versions/1.4/Classes/classes.jar
args
=
args
.
plus
(
"-source"
,
"1.5"
,
"-target"
,
"jsr14"
,
"-bootclasspath"
,
bcp
);
}
if
(
debugInfo
)
{
if
(
debugInfo
)
{
args
=
args
.
plus
(
"-Xlint:unchecked"
,
args
=
args
.
plus
(
"-Xlint:unchecked"
,
"-d"
,
"temp"
,
"-sourcepath"
,
"src/main"
,
"-classpath"
,
classpath
);
"-d"
,
"temp"
,
"-sourcepath"
,
"src/main"
,
"-classpath"
,
classpath
);
...
@@ -216,6 +222,10 @@ public class Build extends BuildBase {
...
@@ -216,6 +222,10 @@ public class Build extends BuildBase {
args
=
args
.
plus
(
"-Xlint:unchecked"
,
"-g:none"
,
args
=
args
.
plus
(
"-Xlint:unchecked"
,
"-g:none"
,
"-d"
,
"temp"
,
"-sourcepath"
,
"src/main"
,
"-classpath"
,
classpath
);
"-d"
,
"temp"
,
"-sourcepath"
,
"src/main"
,
"-classpath"
,
classpath
);
}
}
String
version
=
getTargetJavaVersion
();
if
(
version
!=
null
)
{
args
=
args
.
plus
(
"-target"
,
version
);
}
javac
(
args
,
files
);
javac
(
args
,
files
);
files
=
files
(
"src/main/META-INF/services"
);
files
=
files
(
"src/main/META-INF/services"
);
...
@@ -227,6 +237,9 @@ public class Build extends BuildBase {
...
@@ -227,6 +237,9 @@ public class Build extends BuildBase {
args
=
args
(
"-Xlint:unchecked"
,
"-Xlint:deprecation"
,
args
=
args
(
"-Xlint:unchecked"
,
"-Xlint:deprecation"
,
"-d"
,
"temp"
,
"-sourcepath"
,
"src/test"
+
File
.
pathSeparator
+
"src/tools"
,
"-d"
,
"temp"
,
"-sourcepath"
,
"src/test"
+
File
.
pathSeparator
+
"src/tools"
,
"-classpath"
,
classpath
);
"-classpath"
,
classpath
);
if
(
version
!=
null
)
{
args
=
args
.
plus
(
"-target"
,
version
);
}
javac
(
args
,
files
);
javac
(
args
,
files
);
files
=
files
(
"src/test"
).
files
=
files
(
"src/test"
).
exclude
(
"*.java"
).
exclude
(
"*.java"
).
...
@@ -945,10 +958,14 @@ public class Build extends BuildBase {
...
@@ -945,10 +958,14 @@ public class Build extends BuildBase {
throw
new
RuntimeException
(
"h2.ftpPassword not set"
);
throw
new
RuntimeException
(
"h2.ftpPassword not set"
);
}
}
downloadTest
();
downloadTest
();
mkdir
(
"temp"
);
FileList
files
=
files
(
"src/tools"
).
keep
(
"*/UploadBuild.java"
);
FileList
files
=
files
(
"src/tools"
).
keep
(
"*/UploadBuild.java"
);
StringList
args
=
args
(
"-d"
,
"temp"
,
"-sourcepath"
,
"src/tools"
+
StringList
args
=
args
(
"-d"
,
"temp"
,
"-sourcepath"
,
"src/tools"
+
File
.
pathSeparator
+
"src/test"
+
File
.
pathSeparator
+
"src/main"
);
File
.
pathSeparator
+
"src/test"
+
File
.
pathSeparator
+
"src/main"
);
mkdir
(
"temp"
);
String
version
=
getTargetJavaVersion
();
if
(
version
!=
null
)
{
args
=
args
.
plus
(
"-target"
,
version
);
}
javac
(
args
,
files
);
javac
(
args
,
files
);
String
cp
=
"bin"
+
File
.
pathSeparator
+
"temp"
+
String
cp
=
"bin"
+
File
.
pathSeparator
+
"temp"
+
File
.
pathSeparator
+
"ext/h2mig_pagestore_addon.jar"
;
File
.
pathSeparator
+
"ext/h2mig_pagestore_addon.jar"
;
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论