Initial commit
This commit is contained in:
commit
fe3040fd8b
51 changed files with 1365 additions and 0 deletions
58
examples/.gitignore
vendored
Normal file
58
examples/.gitignore
vendored
Normal file
|
@ -0,0 +1,58 @@
|
|||
.gradle
|
||||
.DS_Store
|
||||
build
|
||||
lib/bld/**
|
||||
!lib/bld/bld-wrapper.jar
|
||||
!lib/bld/bld-wrapper.properties
|
||||
lib/compile/
|
||||
lib/provided/
|
||||
lib/runtime/
|
||||
lib/standalone/
|
||||
lib/test/
|
||||
|
||||
# IDEA ignores
|
||||
|
||||
# User-specific
|
||||
.idea/**/workspace.xml
|
||||
.idea/**/tasks.xml
|
||||
.idea/**/usage.statistics.xml
|
||||
.idea/**/dictionaries
|
||||
.idea/**/shelf
|
||||
|
||||
# AWS User-specific
|
||||
.idea/**/aws.xml
|
||||
|
||||
# Generated files
|
||||
.idea/**/contentModel.xml
|
||||
|
||||
# Sensitive or high-churn files
|
||||
.idea/**/dataSources/
|
||||
.idea/**/dataSources.ids
|
||||
.idea/**/dataSources.local.xml
|
||||
.idea/**/sqlDataSources.xml
|
||||
.idea/**/dynamic.xml
|
||||
.idea/**/uiDesigner.xml
|
||||
.idea/**/dbnavigator.xml
|
||||
|
||||
# Gradle
|
||||
.idea/**/gradle.xml
|
||||
|
||||
# Mongo Explorer plugin
|
||||
.idea/**/mongoSettings.xml
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Cursive Clojure plugin
|
||||
.idea/replstate.xml
|
||||
|
||||
# SonarLint plugin
|
||||
.idea/sonarlint/
|
||||
|
||||
# Editor-based Rest Client
|
||||
.idea/httpRequests
|
||||
|
||||
trace.log
|
28
examples/.idea/app.iml
generated
Normal file
28
examples/.idea/app.iml
generated
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<output url="file://$MODULE_DIR$/build/main" />
|
||||
<output-test url="file://$MODULE_DIR$/build/test" />
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" relativeOutputPath="resources" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module-library" scope="RUNTIME">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="file://$MODULE_DIR$/src/main/resources/templates" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="library" name="compile" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="runtime" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="test" level="project" />
|
||||
</component>
|
||||
</module>
|
14
examples/.idea/bld.iml
generated
Normal file
14
examples/.idea/bld.iml
generated
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<output url="file://$MODULE_DIR$/build/bld" />
|
||||
<output-test url="file://$MODULE_DIR$/build/bld" />
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$/src/bld">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/bld/java" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="bld" level="project" />
|
||||
</component>
|
||||
</module>
|
18
examples/.idea/libraries/bld.xml
generated
Normal file
18
examples/.idea/libraries/bld.xml
generated
Normal file
|
@ -0,0 +1,18 @@
|
|||
<component name="libraryTable">
|
||||
<library name="bld">
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/lib/bld" />
|
||||
<root url="jar://$USER_HOME$/.bld/dist/bld-2.2.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="file://$PROJECT_DIR$/lib/bld" />
|
||||
<root url="jar://$USER_HOME$/.bld/dist/bld-2.2.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
<excluded>
|
||||
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />
|
||||
</excluded>
|
||||
<jarDirectory url="file://$PROJECT_DIR$/lib/bld" recursive="false" />
|
||||
<jarDirectory url="file://$PROJECT_DIR$/lib/bld" recursive="false" type="SOURCES" />
|
||||
</library>
|
||||
</component>
|
17
examples/.idea/libraries/compile.xml
generated
Normal file
17
examples/.idea/libraries/compile.xml
generated
Normal file
|
@ -0,0 +1,17 @@
|
|||
<component name="libraryTable">
|
||||
<library name="compile">
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/lib/compile" />
|
||||
<root url="file://$PROJECT_DIR$/lib/provided" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="file://$PROJECT_DIR$/lib/compile" />
|
||||
<root url="file://$PROJECT_DIR$/lib/provided" />
|
||||
</SOURCES>
|
||||
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="true" />
|
||||
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="true" type="SOURCES" />
|
||||
<jarDirectory url="file://$PROJECT_DIR$/lib/provided" recursive="true" />
|
||||
<jarDirectory url="file://$PROJECT_DIR$/lib/provided" recursive="true" type="SOURCES" />
|
||||
</library>
|
||||
</component>
|
14
examples/.idea/libraries/runtime.xml
generated
Normal file
14
examples/.idea/libraries/runtime.xml
generated
Normal file
|
@ -0,0 +1,14 @@
|
|||
<component name="libraryTable">
|
||||
<library name="runtime">
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/lib/runtime" />
|
||||
<root url="file://$PROJECT_DIR$/src/main/resources" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="file://$PROJECT_DIR$/lib/runtime" />
|
||||
</SOURCES>
|
||||
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="true" />
|
||||
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="true" type="SOURCES" />
|
||||
</library>
|
||||
</component>
|
18
examples/.idea/libraries/test.xml
generated
Normal file
18
examples/.idea/libraries/test.xml
generated
Normal file
|
@ -0,0 +1,18 @@
|
|||
<component name="libraryTable">
|
||||
<library name="test">
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/lib/test" />
|
||||
<root url="file://$PROJECT_DIR$/lib/provided" />
|
||||
<root url="file://$PROJECT_DIR$/src/test/resources" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="file://$PROJECT_DIR$/lib/test" />
|
||||
<root url="file://$PROJECT_DIR$/lib/provided" />
|
||||
</SOURCES>
|
||||
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="true" />
|
||||
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="true" type="SOURCES" />
|
||||
<jarDirectory url="file://$PROJECT_DIR$/lib/provided" recursive="true" />
|
||||
<jarDirectory url="file://$PROJECT_DIR$/lib/provided" recursive="true" type="SOURCES" />
|
||||
</library>
|
||||
</component>
|
5
examples/.idea/misc.xml
generated
Normal file
5
examples/.idea/misc.xml
generated
Normal file
|
@ -0,0 +1,5 @@
|
|||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" project-jdk-name="17" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build" />
|
||||
</component>
|
||||
</project>
|
9
examples/.idea/modules.xml
generated
Normal file
9
examples/.idea/modules.xml
generated
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/app.iml" filepath="$PROJECT_DIR$/.idea/app.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/bld.iml" filepath="$PROJECT_DIR$/.idea/bld.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
13
examples/.idea/runConfigurations/Run Tests.xml
generated
Normal file
13
examples/.idea/runConfigurations/Run Tests.xml
generated
Normal file
|
@ -0,0 +1,13 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Run Tests" type="JUnit" factoryName="JUnit">
|
||||
<module name="app" />
|
||||
<option name="PACKAGE_NAME" value="moog" />
|
||||
<option name="MAIN_CLASS_NAME" value="com.example" />
|
||||
<option name="METHOD_NAME" value="" />
|
||||
<option name="TEST_OBJECT" value="directory" />
|
||||
<dir value="$PROJECT_DIR$/src/test/java" />
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
11
examples/.vscode/launch.json
vendored
Normal file
11
examples/.vscode/launch.json
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "java",
|
||||
"name": "Run Tests",
|
||||
"request": "launch",
|
||||
"mainClass": "com.example.ExamplesTest"
|
||||
}
|
||||
]
|
||||
}
|
14
examples/.vscode/settings.json
vendored
Normal file
14
examples/.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"java.project.sourcePaths": [
|
||||
"src/main/java",
|
||||
"src/main/resources",
|
||||
"src/test/java",
|
||||
"src/bld/java",
|
||||
"src/bld/resources"
|
||||
],
|
||||
"java.configuration.updateBuildConfiguration": "automatic",
|
||||
"java.project.referencedLibraries": [
|
||||
"${HOME}/.bld/dist/bld-2.2.0.jar",
|
||||
"lib/**/*.jar"
|
||||
]
|
||||
}
|
5
examples/README.md
Normal file
5
examples/README.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Compile and Create a JReleaser Config File
|
||||
|
||||
```console
|
||||
./bld compile jreleaser-init
|
||||
```
|
2
examples/bld
Executable file
2
examples/bld
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/usr/bin/env sh
|
||||
java -jar "$(dirname "$0")/lib/bld/bld-wrapper.jar" "$0" --build com.example.ExamplesBuild "$@"
|
4
examples/bld.bat
Normal file
4
examples/bld.bat
Normal file
|
@ -0,0 +1,4 @@
|
|||
@echo off
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
java -jar "%DIRNAME%/lib/bld/bld-wrapper.jar" "%0" --build com.example.ExamplesBuild %*
|
38
examples/jreleaser.json
Normal file
38
examples/jreleaser.json
Normal file
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
"project": {
|
||||
"name": "app",
|
||||
"version": "1.0.0-SNAPSHOT",
|
||||
"description": "Awesome App",
|
||||
"longDescription": "Awesome App",
|
||||
"authors": [
|
||||
"Duke"
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"links": {
|
||||
"homepage": "https://acme.com/app"
|
||||
},
|
||||
"languages" {
|
||||
"java": {
|
||||
"groupId": "com.acme",
|
||||
"version": "8"
|
||||
},
|
||||
}
|
||||
"inceptionYear": "2025"
|
||||
},
|
||||
|
||||
"release": {
|
||||
"github": {
|
||||
"owner": "duke"
|
||||
}
|
||||
},
|
||||
|
||||
"distributions": {
|
||||
"app": {
|
||||
"artifacts": [
|
||||
{
|
||||
"path": "path/to/{{distributionName}}-{{projectVersion}}.zip"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
BIN
examples/lib/bld/bld-wrapper.jar
Normal file
BIN
examples/lib/bld/bld-wrapper.jar
Normal file
Binary file not shown.
9
examples/lib/bld/bld-wrapper.properties
Normal file
9
examples/lib/bld/bld-wrapper.properties
Normal file
|
@ -0,0 +1,9 @@
|
|||
bld.downloadExtensionJavadoc=false
|
||||
bld.downloadExtensionSources=true
|
||||
bld.downloadLocation=
|
||||
bld.extension-pitest=com.uwyn.rife2:bld-jreleaser:0.9.0-SNAPSHOT
|
||||
bld.javaOptions=
|
||||
bld.javacOptions=
|
||||
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_RELEASES,RIFE2_SNAPSHOTS
|
||||
bld.sourceDirectories=
|
||||
bld.version=2.2.0
|
43
examples/src/bld/java/com/example/ExamplesBuild.java
Normal file
43
examples/src/bld/java/com/example/ExamplesBuild.java
Normal file
|
@ -0,0 +1,43 @@
|
|||
package com.example;
|
||||
|
||||
import rife.bld.BuildCommand;
|
||||
import rife.bld.Project;
|
||||
import rife.bld.extension.JReleaserInitOperation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static rife.bld.dependencies.Repository.*;
|
||||
import static rife.bld.dependencies.Scope.*;
|
||||
|
||||
public class ExamplesBuild extends Project {
|
||||
public ExamplesBuild() {
|
||||
pkg = "com.example";
|
||||
name = "examples";
|
||||
version = version(0, 1, 0);
|
||||
|
||||
javaRelease = 17;
|
||||
|
||||
downloadSources = true;
|
||||
autoDownloadPurge = true;
|
||||
|
||||
repositories = List.of(MAVEN_CENTRAL, RIFE2_RELEASES);
|
||||
scope(compile)
|
||||
.include(dependency("org.jreleaser", "jreleaser", version(1, 16, 0)));
|
||||
scope(test)
|
||||
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 4)))
|
||||
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 4)));
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
new ExamplesBuild().start(args);
|
||||
}
|
||||
|
||||
@BuildCommand(value = "jreleaser-init", summary = "Create a JReleaser config file.")
|
||||
public void jreleaserInit() throws Exception {
|
||||
new JReleaserInitOperation()
|
||||
.fromProject(this)
|
||||
.overwrite().debug()
|
||||
.format(JReleaserInitOperation.Format.JSON)
|
||||
.execute();
|
||||
}
|
||||
}
|
7
examples/src/main/java/com/example/Examples.java
Normal file
7
examples/src/main/java/com/example/Examples.java
Normal file
|
@ -0,0 +1,7 @@
|
|||
package com.example;
|
||||
|
||||
public class Examples {
|
||||
public String getMessage() {
|
||||
return "Hello World!";
|
||||
}
|
||||
}
|
12
examples/src/test/java/com/example/ExamplesTest.java
Normal file
12
examples/src/test/java/com/example/ExamplesTest.java
Normal file
|
@ -0,0 +1,12 @@
|
|||
package com.example;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
public class ExamplesTest {
|
||||
@Test
|
||||
void verifyHello() {
|
||||
assertEquals("Hello World!", new Examples().getMessage());
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue