Skip to content

Commit bd7a229

Browse files
committed
initial commit
0 parents  commit bd7a229

File tree

5 files changed

+160
-0
lines changed

5 files changed

+160
-0
lines changed

.travis.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
language: xtend
2+
3+
before_install:
4+
sudo pip install codecov
5+
6+
after_succcess:
7+
codecov

README.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
xtend -> Codecov.io
2+
=======
3+
| [https://codecov.io/][1] | [@codecov][2] | [[email protected]][3] |
4+
| ------------------------ | ------------- | --------------------- |
5+
=======
6+
7+
> This repository serves as an **Example** on how to use codecov uploader for xtend.
8+
9+
## Usage
10+
11+
# [![travis-org](https://avatars2.githubusercontent.com/u/639823?v=2&s=50)](https://travis-ci.org) Travis C
12+
13+
Add to your `.travis.yml` file.
14+
```yml
15+
language: java
16+
17+
before_install: sudo pip install codecov
18+
19+
after_success: codecov
20+
```
21+
22+
23+
[1]: https://codecov.io/
24+
[2]: https://twitter.com/codecov
25+
[3]: mailto:[email protected]

pom.xml

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Copyright (c) 2009, 2012 Mountainminds GmbH & Co. KG and Contributors
4+
All rights reserved. This program and the accompanying materials
5+
are made available under the terms of the Eclipse Public License v1.0
6+
which accompanies this distribution, and is available at
7+
http://www.eclipse.org/legal/epl-v10.html
8+
9+
Contributors:
10+
Evgeny Mandrikov - initial API and implementation
11+
-->
12+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
13+
<modelVersion>4.0.0</modelVersion>
14+
15+
<groupId>org.jacoco</groupId>
16+
<artifactId>org.jacoco.examples.maven.xtend</artifactId>
17+
<version>1.0-SNAPSHOT</version>
18+
<packaging>jar</packaging>
19+
20+
<name>JaCoCo Maven plug-in example for Xtend project</name>
21+
<url>http://www.eclemma.org/jacoco</url>
22+
23+
<dependencies>
24+
<dependency>
25+
<groupId>org.eclipse.xtend</groupId>
26+
<artifactId>org.eclipse.xtend.lib</artifactId>
27+
<version>2.3.0</version>
28+
</dependency>
29+
<dependency>
30+
<groupId>junit</groupId>
31+
<artifactId>junit</artifactId>
32+
<version>4.10</version>
33+
<scope>test</scope>
34+
</dependency>
35+
</dependencies>
36+
37+
<build>
38+
<sourceDirectory>src/main/xtend</sourceDirectory>
39+
<testSourceDirectory>src/test/xtend</testSourceDirectory>
40+
<plugins>
41+
<plugin>
42+
<groupId>org.eclipse.xtend</groupId>
43+
<artifactId>xtend-maven-plugin</artifactId>
44+
<version>2.3.0</version>
45+
<executions>
46+
<execution>
47+
<goals>
48+
<goal>compile</goal>
49+
<goal>testCompile</goal>
50+
</goals>
51+
<configuration>
52+
<outputDirectory>${project.build.directory}/xtend-gen/main</outputDirectory>
53+
<testOutputDirectory>${project.build.directory}/xtend-gen/test</testOutputDirectory>
54+
</configuration>
55+
</execution>
56+
</executions>
57+
</plugin>
58+
<plugin>
59+
<groupId>org.jacoco</groupId>
60+
<artifactId>jacoco-maven-plugin</artifactId>
61+
<version>0.5.8.201207111220</version>
62+
<executions>
63+
<execution>
64+
<goals>
65+
<goal>prepare-agent</goal>
66+
</goals>
67+
</execution>
68+
<execution>
69+
<id>report</id>
70+
<phase>prepare-package</phase>
71+
<goals>
72+
<goal>report</goal>
73+
</goals>
74+
</execution>
75+
</executions>
76+
</plugin>
77+
</plugins>
78+
</build>
79+
80+
<repositories>
81+
<repository>
82+
<id>xtend</id>
83+
<url>http://build.eclipse.org/common/xtend/maven/</url>
84+
</repository>
85+
</repositories>
86+
<pluginRepositories>
87+
<pluginRepository>
88+
<id>xtend</id>
89+
<url>http://build.eclipse.org/common/xtend/maven/</url>
90+
</pluginRepository>
91+
</pluginRepositories>
92+
93+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package org.jacoco.examples.maven.xtend
2+
3+
class HelloWorld {
4+
5+
def String getMessage(boolean bigger) {
6+
if (bigger) {
7+
return "Hello Universe!";
8+
} else {
9+
return "Hello World!";
10+
}
11+
}
12+
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package org.jacoco.examples.maven.xtend
2+
3+
import static org.junit.Assert.*
4+
5+
import org.junit.Before
6+
import org.junit.Test
7+
8+
class HelloWorldTest {
9+
10+
private HelloWorld subject;
11+
12+
@Before
13+
def void setup() {
14+
subject = new HelloWorld();
15+
}
16+
17+
@Test
18+
def void testGetMessage() {
19+
assertEquals("Hello World!", subject.getMessage(false));
20+
}
21+
22+
}

0 commit comments

Comments
 (0)