Skip to content

Commit a55c415

Browse files
committed
Chg: improving docs
1 parent 25541c7 commit a55c415

4 files changed

Lines changed: 230 additions & 12 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ As of version 1.0.0, the project will try and follow [Semantic Versioning](https
88

99
* empty
1010

11-
## [1.0.0] - 2019/0X/XX
11+
## [1.0.0] - 2019/02/28
1212

1313
This first official version introduces several changes. They are listed here.
1414

README.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11

2-
[![Build Status](https://travis-ci.org/jbotsim/JBotSim.svg?branch=master)][github-jbotsim]
3-
[![Maven Central](https://img.shields.io/badge/maven%20central-1.0.0-red.svg)](https://search.maven.org/search?q=g:io.jbotsim%20AND%20v:1.0.0)
4-
[![License](https://img.shields.io/badge/license-LGPL%20≥%203.0-blue.svg)][lgpl3]
2+
[![Build Status](https://travis-ci.org/jbotsim/JBotSim.svg?branch=master)][travis-jbotsim]
3+
[![Maven Central](https://img.shields.io/badge/maven%20central-1.0.0-informational.svg)][mavencentral-jbotsim-1-0-0]
4+
[![License](https://img.shields.io/badge/license-LGPL%20≥%203.0-informational.svg)][lgpl3]
55

66

77

88
# The JBotSim Library
99

1010
* [Introduction](#introduction)
1111
* [Hello World example](#hello-world-example)
12-
* [Current Version](#current-version)
12+
* [Current version](#current-version)
1313
* [*Maven* dependency](#maven-dependency)
1414
+ [Using Gradle](#using-gradle)
1515
+ [Using Maven](#using-maven)
@@ -42,7 +42,7 @@ It is that simple!
4242

4343
### Declaring the dependency
4444
> Here, we work with a IntelliJ IDEA Java project, fetching dependencies from Maven Central.
45-
> For other project configurations, see TODO.
45+
> Other configurations are detailed [here](apps/examples/CreateUserProject.md).
4646
4747

4848
For this HelloWorld, we will simply retrieve the `jbotsim-all` artifact
@@ -95,12 +95,12 @@ the user by selecting *"Start execution"* in the `JViewer`'s contextual menu (ri
9595
> Please see the [*Examples*](http://jbotsim.io/?p=examples) section of [JBotSim's website](http://jbotsim.io) for more
9696
examples.
9797

98-
## Current Version
98+
## Current version
9999

100100
> Note: As of version `1.0.0`, the JBotSim project will try and follow the rules provided by the
101101
[Semantic Versioning](https://semver.org/).
102102

103-
The latest public version is [`1.0-beta03`](https://sourceforge.net/projects/jbotsim/files/latest/download).
103+
The latest public version is [`1.0.0`][mavencentral-jbotsim-1-0-0].
104104
Please see the [CHANGELOG.md](CHANGELOG.md) for previous versions modifications.
105105

106106

@@ -150,7 +150,7 @@ If your build system uses *Maven*, you will want to add something like this to y
150150

151151
If you use a _Java Project_ in _IntelliJ IDEA_, add the following dependency (as explained [here](#declaring-the-dependency)):
152152
```
153-
"io.jbotsim:jbotsim-all:1.0.0"
153+
io.jbotsim:jbotsim-all:1.0.0
154154
```
155155

156156

@@ -160,7 +160,7 @@ The JBotSim project is separated in three main modules.
160160
Please follow the links to each of them for more information:
161161
* [`apps`](./apps/README.md): contains some sample apps and mains using modules from `lib`.
162162
* [`lib`](./lib/README.md): contains submodules responsible for the generation and publication of unitary *jars* files
163-
on [Maven Central](https://search.maven.org/search?q=g:io.jbotsim).
163+
on [Maven Central][mavencentral-jbotsim].
164164
* [`fats`](./fats/README.md): contains submodules responsible for the generation of standalone *fat jars* by using
165165
existing published JBotSim jars (published by `lib`).
166166

@@ -206,6 +206,9 @@ gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys DFA48EDB1EDEBA6F
206206
```
207207

208208

209+
[travis-jbotsim]: https://travis-ci.org/jbotsim/JBotSim
209210
[github-jbotsim]: https://github.com/jbotsim/JBotSim
211+
[mavencentral-jbotsim-1-0-0]: https://search.maven.org/search?q=g:io.jbotsim%20AND%20v:1.0.0
212+
[mavencentral-jbotsim]: https://search.maven.org/search?q=g:io.jbotsim
210213
[github-jbotsim-issues]: https://github.com/jbotsim/JBotSim/issues
211214
[lgpl3]: http://www.gnu.org/licenses/lgpl-3.0.html

apps/examples/CreateUserProject.md

Lines changed: 215 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,215 @@
1+
2+
# Creating a project using JBotSim
3+
> The steps described here have been generated with a IntelliJ IDEA 2018.3.3 (Ultimate Edition)
4+
> (Build #IU-183.5153.38, built on January 9, 2019)
5+
6+
7+
## Pre requisite
8+
The guidance provided here suppose that you have a
9+
[usable](https://www.jetbrains.com/help/idea/install-and-set-up-product.html) *IntelliJ IDEA* instance.
10+
11+
## Introduction
12+
13+
In this documentation, we focus on creating a project that will:
14+
* allow you to run JBotSim's [*Hello World*](./README.md#helloworld-class),
15+
* make *IntelliJ IDEA*'s [Quick Documentation](https://www.jetbrains.com/help/idea/viewing-reference-information.html#inline-quick-documentation)
16+
on JBotSim symbols available.
17+
18+
19+
20+
The configuration process takes place in the following two steps.
21+
* First, the [project creation](#project-creation). You will either be:
22+
* [creating a Java project](#creating-a-java-project) or
23+
* [creating a Gradle project](#creating-a-gradle-project).
24+
* Then, the [configuration of your dependency to JBotSim](#adding-the-jbotsim-dependency):
25+
* using the [Maven central version](#using-the-maven-central-version) with
26+
* a [Java project](#java-project) or
27+
* a [Gradle project](#gradle-project);
28+
* using the [standalone jar version](#using-the-standalone-jar-version) with
29+
* a [Java project](#java-project-standalone) or
30+
* a [Gradle project](#gradle-project-standalone).
31+
32+
## Project creation
33+
34+
### Creating a Java project
35+
36+
* Starting the new project wizard:
37+
38+
`File` > `New` > `Project...`
39+
40+
* Creating a Java project
41+
42+
* Select: `Java`
43+
* Make sure a *Project SDK* is selected (either 8 or 10) -- should be set by default
44+
* Nothing more to select. You can deselect anything selected in there.
45+
* Hit `Next`.
46+
47+
* Choosing a template
48+
49+
* You can optionally select the `Java Hello World` template.
50+
51+
This will generate a `Main.java` file.
52+
* Hit `Next`.
53+
54+
* Choosing your project's name and directory
55+
56+
* Provide a project name
57+
* Provide a directory
58+
59+
This field is automatically filled by *IntelliJ IDEA* depending on your project's name. In most cases, you will want
60+
to leave it as is.
61+
* Hit `Finish`.
62+
63+
After some automatic configuration, the project should be created.
64+
65+
### Creating a Gradle project
66+
67+
* Starting the new project wizard:
68+
69+
`File` > `New` > `Project...`
70+
71+
* Creating a Java project
72+
73+
* Select: `Gradle`
74+
* Make sure a Project SDK is chosen (either 8 or 10) -- should be set by default
75+
* In "Additional Libraries and Frameworks", make sure "Java" is ticked.
76+
* Hit `Next`.
77+
78+
* *GroupId* and *ArtifactId* Screen
79+
* Fill in the fields:
80+
* `GroupId`: your namespace (*e.g.* `com.example`)
81+
* `ArtifactId`: your application/library name (*e.g.* `jbotsim-app`)
82+
* `Version`: leave as is (usually `1.0-SNAPSHOT`)
83+
* Hit `Next`.
84+
85+
* Gradle configuration screen
86+
* tick `Use auto-import`
87+
* make sure `Use default gradle wrapper` radio button is selected
88+
* you can leave the rest as is
89+
* Hit `Next`.
90+
91+
92+
* Project name and location screen
93+
* these should already be filled in. Only modify those fields if you know you have to.
94+
* Hit `Finish`.
95+
96+
After some automatic configuration, the project should be created.
97+
98+
99+
## Adding the JBotSim dependency
100+
101+
### Using the Maven Central version
102+
103+
This method takes advantage of the fact that JBotSim has been published on *Maven Central*.
104+
105+
106+
Any JBotSim classes, source code and documentation will automatically be downloaded for you.
107+
108+
#### Java project
109+
110+
***Adding the JBotSim project jar as a dependency***
111+
* Open the Project Structure popup
112+
113+
`File` > `Project Structure`
114+
115+
* Open the "New Project Library" popup:
116+
* select `Libraries` in the left panel
117+
* click `+`
118+
* choose `From Maven ...`.
119+
120+
* In the "Download Library from Maven Repository" popup:
121+
* provide the following dependency: `io.jbotsim:jbotsim-all:1.0.0`
122+
* make sure to tick `JavaDocs`
123+
* Hit `OK`.
124+
* Confirm that you want to add it to your (only) module.
125+
126+
And you are done! You can copy paste the example.
127+
128+
***Documentation***
129+
* if you have ticked "JavaDocs", the documentation should already be available.
130+
* you can also provide the *javadoc-only* *jar*, containing only the javadoc, by using the same process described
131+
[here](#java-project-standalone).
132+
* providing the url to the online javadoc is still possible
133+
* open Project Structure
134+
* in `Libraries`, select your maven dependency
135+
* click on `Specify Documentation URL`
136+
* provide the javadoc url
137+
138+
#### Gradle project
139+
140+
Simply add the following line to your `build.gradle`:
141+
142+
```
143+
dependencies {
144+
implementation "io.jbotsim:jbotsim-all:1.0.0"
145+
}
146+
```
147+
148+
149+
### Using the standalone jar version
150+
151+
> Using the standalone version should be reserved to already existing projects and offline usages.
152+
> Please consider using the [Maven Central version](#using-the-maven-central-version).
153+
154+
155+
#### Java project standalone
156+
157+
***Adding the JBotSim project jar as a dependency***
158+
* Open the Project Structure popup
159+
160+
`File` > `Project Structure`
161+
162+
* Open the "New Project Library" popup:
163+
* select `Libraries` in the left panel
164+
* click `+`
165+
* choose `Java`.
166+
167+
* In the popup, provide the JBotSim full *jar* (from the location you stored it)
168+
* Confirm that you want to add it to your (only) module.
169+
170+
And you are done! You can copy paste the example.
171+
172+
***Documentation***
173+
* if you have provided the *classes + javadoc* jar, intellij will automatically find the documentation.
174+
175+
Be careful on not distributing your application with this version of the *jar*.
176+
177+
* if you have provided the *classes only* jar, can add documentation by:
178+
* providing the *javadoc-only* *jar*, containing only the javadoc, by using the same process.
179+
180+
* providing the url to the online javadoc
181+
* open Project Structure
182+
* select your .jar in modules
183+
* click on `Specify Documentation URL`
184+
* provide the javadoc url
185+
186+
187+
#### Gradle project standalone
188+
189+
>Creating a *gradle* project with the fat-jar makes sense if you are really afraid of (or not able to use) *maven* at
190+
>the time you create your project but consider using it later.
191+
192+
>Please see [gradle-related *maven* configuration](#gradle-project).
193+
194+
195+
***Adding the JBotSim project jar as a dependency***
196+
* Put the jar in a directory inside your project
197+
198+
*e.g.* directory `mylibs`
199+
200+
* In the `build.gradle` file, add the following statement:
201+
202+
```
203+
dependencies {
204+
compile files('mylibs/jbotsim-full-1.0.0.jar')
205+
}
206+
```
207+
208+
And you are done! You can copy paste the example.
209+
210+
211+
***Documentation***
212+
* you can also provide the *javadoc-only* *jar*, containing only the javadoc, by using the same process described
213+
[here](#java-project-standalone).
214+
* providing the url to the online javadoc can work, but should be linked to another (possibly empty) lib, or your jvm.
215+

fats/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ See [project structure](#project-structure) for existing ones.
1919

2020
## Project structure
2121
The submodules are listed below:
22-
* [`jbotsim-full`](./jbotsim-full/README.md): a *fat jar* containing all JBotSim *jars*.
23-
* [`jbotsim-common`](./jbotsim-common/README.md): a *fat jar* containing all non-specific classes from JBotSim.
22+
* [`fat-jbotsim-full`](./fat-jbotsim-full/README.md): a *fat jar* containing all JBotSim *jars*.
23+
* [`fat-jbotsim-common`](./fat-jbotsim-common/README.md): a *fat jar* containing all non-specific classes from JBotSim.
2424

0 commit comments

Comments
 (0)