Skip to content

Commit 9ae8f95

Browse files
author
BFT\a.rogalskii
committed
Added info on workflows
Updates on github-actions
1 parent f988440 commit 9ae8f95

File tree

8 files changed

+356
-10
lines changed

8 files changed

+356
-10
lines changed

build.gradle

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ plugins {
1717
id("jacoco")
1818
id("org.sonarqube")
1919
id("java")
20-
id("maven")
20+
id("maven-publish")
2121
id("checkstyle")
2222
id("java-gradle-plugin")
2323
}
@@ -81,6 +81,12 @@ allprojects {
8181
all*.exclude group: "org.springframework.boot", module: "spring-boot-starter-logging"
8282
}
8383

84+
java {
85+
toolchain {
86+
languageVersion = JavaLanguageVersion.of(8)
87+
}
88+
}
89+
8490
repositories {
8591
jcenter()
8692
mavenCentral()
@@ -186,15 +192,14 @@ subprojects {
186192
version projectConfig.version
187193
description = projectConfig.description
188194

189-
sourceCompatibility = projectConfig.sourceCompatibility
190-
targetCompatibility = projectConfig.targetCompatibility
195+
// sourceCompatibility = projectConfig.sourceCompatibility
196+
// targetCompatibility = projectConfig.targetCompatibility
191197

192198
archivesBaseName = project.buildFile
193199
project.buildDir = projectConfig.projectBuildDir
194200

195201
repositories {
196202
mavenCentral()
197-
jcenter()
198203
google()
199204
}
200205

@@ -261,7 +266,7 @@ subprojects {
261266
}
262267

263268
jar {
264-
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
269+
//from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
265270
//from { configurations.runtimeClasspath.get().filter { it.name.endsWith("jar") }.map { zipTree(it) } }
266271

267272
manifest {
@@ -275,7 +280,7 @@ subprojects {
275280
attributes("Implementation-Title": projectConfig.module)
276281
attributes("Implementation-Version": project.version)
277282
attributes("Created-By": projectConfig.vendor)
278-
attributes("Class-Path": configurations.compile.collect { it.getPath() }.join(" "))
283+
//attributes("Class-Path": configurations.compile.collect { it.getPath() }.join(" "))
279284
}
280285
}
281286
}

buildSrc/src/main/groovy/subproject.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ compileJava {
3838
options.fork = true
3939
//options.forkOptions.executable = "${System.getenv("JAVA_HOME")}/bin/javac"
4040
options.compilerArgs += [
41-
'--module-path', classpath.asPath,
41+
// '--module-path',
42+
classpath.asPath,
4243
]
4344
classpath = files()
4445
}

settings.gradle

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,12 @@ subDirs.each { File dir ->
8282
//}
8383

8484
//rootProject.children.forEach {
85-
// it.projectDir = rootDir.resolve( "subprojects/${it.name}")
85+
// it.projectDir = rootDir.resolve("subprojects/${it.name}")
8686
//}
87+
88+
file('plugins').eachDir { dir ->
89+
def projectName = dir.name
90+
if (projectName != "build" && findProject(":plugins:${projectName}") == null) {
91+
throw new GradleException("Plugin /plugins/${projectName} was not included into the build. Check settings.gradle for details.")
92+
}
93+
}

thrift/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id "org.jruyi.thrift" version "0.4.1"
2+
id "org.jruyi.thrift" version "0.4.2"
33
}
44

55
dependencies {
@@ -15,7 +15,7 @@ compileThrift {
1515
createGenFolder false
1616

1717
generator 'java', 'private-members'
18-
//generator 'html'
18+
generator 'html'
1919
}
2020

2121
sourceSets {

thrift/src/main/java/division.html

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
5+
<link href="style.css" rel="stylesheet" type="text/css"/>
6+
<title>Thrift module: division</title></head><body>
7+
<div class="container-fluid">
8+
<h1>Thrift module: division</h1>
9+
<table class="table-bordered table-striped table-condensed"><thead><tr><th>Module</th><th>Services</th><th>Data types</th><th>Constants</th></tr></thead><tbody>
10+
<tr>
11+
<td>division</td><td><a href="#Svc_DivisionService">DivisionService</a><br/>
12+
<ul>
13+
<li><a href="#Fn_DivisionService_divide">divide</a></li>
14+
</ul>
15+
</td>
16+
<td><a href="#Typedef_int">int</a><br/>
17+
</td>
18+
<td></td>
19+
</tr></tbody></table>
20+
<hr/><h2 id="Typedefs">Type declarations</h2>
21+
<div class="definition"><h3 id="Typedef_int">Typedef: int</h3>
22+
<p><strong>Base type:</strong>&nbsp;<code>i32</code></p>
23+
</div>
24+
<hr/><h2 id="Services">Services</h2>
25+
<h3 id="Svc_DivisionService">Service: DivisionService</h3>
26+
<div class="definition"><h4 id="Fn_DivisionService_divide">Function: DivisionService.divide</h4>
27+
<pre><code><a href="#Struct_int">int</a></code> divide(<code><a href="#Struct_int">int</a></code> n1,
28+
<code><a href="#Struct_int">int</a></code> n2)
29+
</pre></div></div></body></html>

thrift/src/main/java/index.html

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<!DOCTYPE html>
2+
<html lang="en"><head>
3+
<link href="style.css" rel="stylesheet" type="text/css"/>
4+
<title>All Thrift declarations</title></head><body>
5+
<div class="container-fluid">
6+
<h1>All Thrift declarations</h1>
7+
<table class="table-bordered table-striped table-condensed"><thead><tr><th>Module</th><th>Services</th><th>Data types</th><th>Constants</th></tr></thead><tbody>
8+
<tr>
9+
<td>message</td><td><a href="message.html#Svc_Calculator">Calculator</a><br/>
10+
<ul>
11+
<li><a href="message.html#Fn_Calculator_add">add</a></li>
12+
<li><a href="message.html#Fn_Calculator_calculate">calculate</a></li>
13+
<li><a href="message.html#Fn_Calculator_ping">ping</a></li>
14+
<li><a href="message.html#Fn_Calculator_zip">zip</a></li>
15+
</ul>
16+
</td>
17+
<td><a href="message.html#Struct_InvalidOperation">InvalidOperation</a><br/>
18+
<a href="message.html#Enum_Operation">Operation</a><br/>
19+
<a href="message.html#Struct_Work">Work</a><br/>
20+
</td>
21+
<td><code><a href="message.html#Const_INT32CONSTANT">INT32CONSTANT</a></code><br/>
22+
<code><a href="message.html#Const_MAPCONSTANT">MAPCONSTANT</a></code><br/>
23+
</td>
24+
</tr><tr>
25+
<td>division</td><td><a href="division.html#Svc_DivisionService">DivisionService</a><br/>
26+
<ul>
27+
<li><a href="division.html#Fn_DivisionService_divide">divide</a></li>
28+
</ul>
29+
</td>
30+
<td><a href="division.html#Typedef_int">int</a><br/>
31+
</td>
32+
<td></td>
33+
</tr></tbody></table>
34+
</div></body></html>

thrift/src/main/java/message.html

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
5+
<link href="style.css" rel="stylesheet" type="text/css"/>
6+
<title>Thrift module: message</title></head><body>
7+
<div class="container-fluid">
8+
<h1>Thrift module: message</h1>
9+
<table class="table-bordered table-striped table-condensed"><thead><tr><th>Module</th><th>Services</th><th>Data types</th><th>Constants</th></tr></thead><tbody>
10+
<tr>
11+
<td>message</td><td><a href="#Svc_Calculator">Calculator</a><br/>
12+
<ul>
13+
<li><a href="#Fn_Calculator_add">add</a></li>
14+
<li><a href="#Fn_Calculator_calculate">calculate</a></li>
15+
<li><a href="#Fn_Calculator_ping">ping</a></li>
16+
<li><a href="#Fn_Calculator_zip">zip</a></li>
17+
</ul>
18+
</td>
19+
<td><a href="#Struct_InvalidOperation">InvalidOperation</a><br/>
20+
<a href="#Enum_Operation">Operation</a><br/>
21+
<a href="#Struct_Work">Work</a><br/>
22+
</td>
23+
<td><code><a href="#Const_INT32CONSTANT">INT32CONSTANT</a></code><br/>
24+
<code><a href="#Const_MAPCONSTANT">MAPCONSTANT</a></code><br/>
25+
</td>
26+
</tr></tbody></table>
27+
<hr/><h2 id="Constants">Constants</h2>
28+
<table class="table-bordered table-striped table-condensed"><thead><tr><th>Constant</th><th>Type</th><th>Value</th></tr></thead><tbody>
29+
<tr id="Const_INT32CONSTANT"><td><code>INT32CONSTANT</code></td><td><code>i32</code></td><td><code>9853</code></td></tr><tr><td colspan="3"><blockquote><pre>Thrift also lets you define constants for use across languages. Complex
30+
types and structs are specified using JSON notation.
31+
</pre><br/></blockquote></td></tr><tr id="Const_MAPCONSTANT"><td><code>MAPCONSTANT</code></td><td><code>map&lt;<code>string</code>, <code>string</code>&gt;</code></td><td><code>{ "goodnight" = "moon", "hello" = "world" }</code></td></tr></tbody></table><hr/><h2 id="Enumerations">Enumerations</h2>
32+
<div class="definition"><h3 id="Enum_Operation">Enumeration: Operation</h3>
33+
<pre>You can define enums, which are just 32 bit integers. Values are optional
34+
and start at 1 if not supplied, C style again.
35+
</pre><br/><br/><table class="table-bordered table-striped table-condensed">
36+
<tr><td><code>ADD</code></td><td><code>1</code></td><td>
37+
</td></tr>
38+
<tr><td><code>SUBTRACT</code></td><td><code>2</code></td><td>
39+
</td></tr>
40+
<tr><td><code>MULTIPLY</code></td><td><code>3</code></td><td>
41+
</td></tr>
42+
<tr><td><code>DIVIDE</code></td><td><code>4</code></td><td>
43+
</td></tr>
44+
</table></div>
45+
<hr/><h2 id="Structs">Data structures</h2>
46+
<div class="definition"><h3 id="Struct_Work">Struct: Work</h3>
47+
<table class="table-bordered table-striped table-condensed"><thead><tr><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></tr></thead><tbody>
48+
<tr><td>1</td><td>num1</td><td><code>i32</code></td><td></td><td>default</td><td><code>0</code></td></tr>
49+
<tr><td>2</td><td>num2</td><td><code>i32</code></td><td></td><td>default</td><td></td></tr>
50+
<tr><td>3</td><td>op</td><td><code><a href="#Enum_Operation">Operation</a></code></td><td></td><td>default</td><td></td></tr>
51+
<tr><td>4</td><td>comment</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
52+
</tbody></table><br/><pre>Structs are the basic complex data structures. They are comprised of fields
53+
which each have an integer identifier, a type, a symbolic name, and an
54+
optional default value.
55+
56+
Fields can be declared "optional", which ensures they will not be included
57+
in the serialized output if they aren't set. Note that this requires some
58+
manual management in some languages.
59+
</pre><br/></div><div class="definition"><h3 id="Struct_InvalidOperation">Exception: InvalidOperation</h3>
60+
<table class="table-bordered table-striped table-condensed"><thead><tr><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></tr></thead><tbody>
61+
<tr><td>1</td><td>what</td><td><code>i32</code></td><td></td><td>default</td><td></td></tr>
62+
<tr><td>2</td><td>why</td><td><code>string</code></td><td></td><td>default</td><td></td></tr>
63+
</tbody></table><br/><pre>Structs can also be exceptions, if they are nasty.
64+
</pre><br/></div><hr/><h2 id="Services">Services</h2>
65+
<h3 id="Svc_Calculator">Service: Calculator</h3>
66+
<pre>Ahh, now onto the cool part, defining a service. Services just need a name
67+
and can optionally inherit from another service using the extends keyword.
68+
</pre><br/><div class="definition"><h4 id="Fn_Calculator_ping">Function: Calculator.ping</h4>
69+
<pre><code>void</code> ping()
70+
</pre><pre>A method definition looks like C code. It has a return type, arguments,
71+
and optionally a list of exceptions that it may throw. Note that argument
72+
lists and exception lists are specified using the exact same syntax as
73+
field lists in struct or exception definitions.
74+
</pre><br/></div><div class="definition"><h4 id="Fn_Calculator_add">Function: Calculator.add</h4>
75+
<pre><code>i32</code> add(<code>i32</code> num1,
76+
<code>i32</code> num2)
77+
</pre></div><div class="definition"><h4 id="Fn_Calculator_calculate">Function: Calculator.calculate</h4>
78+
<pre><code>i32</code> calculate(<code>i32</code> logid,
79+
<code><a href="#Struct_Work">Work</a></code> w)
80+
throws <code><a href="#Struct_InvalidOperation">InvalidOperation</a></code>
81+
</pre></div><div class="definition"><h4 id="Fn_Calculator_zip">Function: Calculator.zip</h4>
82+
<pre><code>void</code> zip()
83+
</pre><pre>This method has a oneway modifier. That means the client only makes
84+
a request and does not listen for any response at all. Oneway methods
85+
must be void.
86+
</pre><br/></div></div></body></html>

0 commit comments

Comments
 (0)