Skip to content

Commit 2e26fb1

Browse files
authored
Merge pull request github#11819 from smowton/smowton/admin/port-java-autobuilder-tests
Add Java autobuilder integration tests
2 parents 06ea249 + 52297c0 commit 2e26fb1

File tree

166 files changed

+4562
-0
lines changed

Some content is hidden

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

166 files changed

+4562
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<project name="ant-sample" default="dist" basedir=".">
2+
<description>
3+
simple example build file
4+
</description>
5+
<!-- set global properties for this build -->
6+
<property name="src" location="src"/>
7+
<property name="build" location="build"/>
8+
<property name="dist" location="dist"/>
9+
10+
<target name="init">
11+
<!-- Create the time stamp -->
12+
<tstamp/>
13+
<!-- Create the build directory structure used by compile -->
14+
<mkdir dir="${build}"/>
15+
</target>
16+
17+
<target name="compile" depends="init"
18+
description="compile the source">
19+
<!-- Compile the Java code from ${src} into ${build} -->
20+
<javac srcdir="${src}" destdir="${build}"/>
21+
</target>
22+
23+
<target name="dist" depends="compile"
24+
description="generate the distribution">
25+
<!-- Create the distribution directory -->
26+
<mkdir dir="${dist}/lib"/>
27+
28+
<!-- Put everything in ${build} into the ant-sample-${DSTAMP}.jar file -->
29+
<jar jarfile="${dist}/lib/ant-sample-${DSTAMP}.jar" basedir="${build}"/>
30+
</target>
31+
32+
<target name="clean"
33+
description="clean up">
34+
<!-- Delete the ${build} and ${dist} directory trees -->
35+
<delete dir="${build}"/>
36+
<delete dir="${dist}"/>
37+
</target>
38+
</project>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* This Java source file was generated by the Gradle 'init' task.
3+
*/
4+
package com.example;
5+
6+
public class App {
7+
public String getGreeting() {
8+
return "Hello world.";
9+
}
10+
11+
public static void main(String[] args) {
12+
System.out.println(new App().getGreeting());
13+
}
14+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
xmlFiles
2+
| build.xml:0:0:0:0 | build.xml |
3+
#select
4+
| src/main/java/com/example/App.java:0:0:0:0 | App |
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import sys
2+
3+
from create_database_utils import *
4+
5+
run_codeql_database_create([], lang="java")
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import java
2+
3+
from File f
4+
where f.isSourceFile()
5+
select f
6+
7+
query predicate xmlFiles(XmlFile x) { any() }
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#
2+
# https://help.github.com/articles/dealing-with-line-endings/
3+
#
4+
# These are explicitly windows files and should use crlf
5+
*.bat text eol=crlf
6+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Ignore Gradle project-specific cache directory
2+
.gradle
3+
4+
# Ignore Gradle build output directory
5+
build
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* This build file was auto generated by running the Gradle 'init' task
3+
* by 'arthur' at '28/11/20 22:29' with Gradle 3.0
4+
*
5+
* This generated file contains a sample Java project to get you started.
6+
* For more details take a look at the Java Quickstart chapter in the Gradle
7+
* user guide available at https://docs.gradle.org/3.0/userguide/tutorial_java_projects.html
8+
*/
9+
10+
// Apply the java plugin to add support for Java
11+
apply plugin: 'java'
12+
13+
// In this section you declare where to find the dependencies of your project
14+
repositories {
15+
// Use 'jcenter' for resolving your dependencies.
16+
// You can declare any Maven/Ivy/file repository here.
17+
jcenter()
18+
}
19+
20+
// In this section you declare the dependencies for your production and test code
21+
dependencies {
22+
// The production code uses the SLF4J logging API at compile time
23+
compile 'org.slf4j:slf4j-api:1.7.21'
24+
25+
// Declare the dependency for your favourite test framework you want to use in your tests.
26+
// TestNG is also supported by the Gradle Test task. Just change the
27+
// testCompile dependency to testCompile 'org.testng:testng:6.8.1' and add
28+
// 'test.useTestNG()' to your build script.
29+
testCompile 'junit:junit:4.12'
30+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<verification-metadata>
3+
<configuration>
4+
<verify-metadata>true</verify-metadata>
5+
<verify-signatures>false</verify-signatures>
6+
</configuration>
7+
</verification-metadata>

0 commit comments

Comments
 (0)