Renamed example to examples
This commit is contained in:
parent
45581b8001
commit
31584513b0
27 changed files with 3 additions and 3 deletions
45
examples/src/bld/java/com/example/SampleBuild.java
Normal file
45
examples/src/bld/java/com/example/SampleBuild.java
Normal file
|
@ -0,0 +1,45 @@
|
|||
package com.example;
|
||||
|
||||
import rife.bld.BuildCommand;
|
||||
import rife.bld.Project;
|
||||
import rife.bld.extension.GeneratedVersionOperation;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
import static rife.bld.dependencies.Repository.MAVEN_CENTRAL;
|
||||
import static rife.bld.dependencies.Repository.RIFE2_RELEASES;
|
||||
import static rife.bld.dependencies.Scope.test;
|
||||
|
||||
public class SampleBuild extends Project {
|
||||
public SampleBuild() {
|
||||
pkg = "com.example";
|
||||
name = "Sample";
|
||||
mainClass = "com.example.SampleMain";
|
||||
version = version(1, 0, 1, "rc1");
|
||||
|
||||
downloadSources = true;
|
||||
repositories = List.of(MAVEN_CENTRAL, RIFE2_RELEASES);
|
||||
scope(test)
|
||||
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 9, 2)))
|
||||
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 9, 2)));
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
new SampleBuild().start(args);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void compile() throws Exception {
|
||||
genver();
|
||||
super.compile();
|
||||
}
|
||||
|
||||
@BuildCommand(summary = "Generates version class")
|
||||
public void genver() throws Exception {
|
||||
new GeneratedVersionOperation()
|
||||
.fromProject(this)
|
||||
// .classTemplate(new File(".", "myversion.txt"))
|
||||
.execute();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue