From 7055e00631f07a534069e501c8f71066fc70c164 Mon Sep 17 00:00:00 2001 From: Basil Peace Date: Mon, 21 Aug 2017 22:42:03 +0300 Subject: [PATCH 1/2] Fix misspellings in README.md --- README.md | 58 +++++++++++++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 1649a98..75f8660 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ [![Coverage Status](https://coveralls.io/repos/Tocea/gradle-cpp-plugin/badge.svg?branch=master)](https://coveralls.io/r/Tocea/gradle-cpp-plugin?branch=master) # gradle-cpp-plugin -Gradle C/C++ plugin with C++ build tools interactions. This plugins launches C++ build tools and adds Gradle capabilities like : +Gradle C/C++ plugin with C++ build tools interactions. This plugins launches C++ build tools and adds Gradle capabilities like: -1. Dedendencies management +1. Dependencies management 2. Packaging 3. Upload 4. DAG of tasks @@ -13,7 +13,7 @@ Gradle C/C++ plugin with C++ build tools interactions. This plugins launches C++ ## Usage To use the gradle-cpp-plugin, include the following in your build script: -**Exemple 1. Using the gradle-cpp-plugin** +**Example 1. Using the gradle-cpp-plugin** **build.gradle** @@ -33,7 +33,7 @@ apply plugin: "fr.echoes.gradle.cpp" ``` ## Source sets -The Cpp plugin is used to be used with this kind of structure folders +The Cpp plugin is used to be used with this kind of structure of folders: ``` project @@ -67,9 +67,9 @@ The cpp plugin adds a number of tasks to your project, as shown below. | install | build | Upload | Uploads the distZip archive in the local repository | | uploadArchive | build | Upload | Uploads the distZip archive in a remote repository | -**Figure 1. Cpp plugin -tasks** +**Figure 1. Cpp plugin - tasks** -![plugin tassks](images/cppPluginGraph.jpg) +![plugin tasks](images/cppPluginGraph.jpg) ## Dependency management @@ -78,12 +78,12 @@ The cpp plugin adds a number of dependencies configurations to your project, as **Table 2. Cpp plugin - dependency configurations** -| Name | exdends | Used by tasks | Used by tasks | +| Name | extends | Used by tasks | Used by tasks | | ----------- | ---------- | ---------------- | -------------------------------| | compile | - | compileJava | Compile time dependencies | -**Exemple 2. External dependencies** +**Example 2. External dependencies** ```groovy dependencies { @@ -93,7 +93,7 @@ dependencies { } ``` -**Exemple 3. Internal dependencies** +**Example 3. Internal dependencies** ```groovy dependencies { @@ -103,33 +103,33 @@ dependencies { ## The notion of 'Projects' -*Gradle* is a **project** and **dependencies** manager. So, a gradle project must be seen as an **atomic project** which contains only : +*Gradle* is a **project** and **dependencies** manager. So, a gradle project must be seen as an **atomic project** which contains only: * sources in `src/main/headers` and `src/main/cpp` * test sources in `src/test/headers` and `src/test/cpp` * configuration file (`build.gradle` and, for exemple with *CMake*,`CMakeLists.txt` locateds **only on the project root location**. -The C building tool under *Gradle* have to be able to : +The C building tool under *Gradle* have to be able to: * compile sources (with for example `make compile`) * compile testSources (with for example `make testCompile`) * execute test (with for example `make test`) Projects examples can be found in the plugin source code in the `examples` folders. -**note :** at this time, I'm not a cmake expert. I do not succes to create all this make rules with *CMake* : I only manage to compile sources and test sources with the command `make` and launching test with the command `make test` using *ctest*. +**note:** at this time, I'm not a cmake expert. I do not succes to create all this make rules with *CMake*: I only manage to compile sources and test sources with the command `make` and launching test with the command `make test` using *ctest*. If someone can tell me how to do this in the examples projects. All contributions will be appreciate: -*Cmake* project are used to have a `CMakeLists.txt` file in many folders. And C project are used to have libraries notions inside a project as we can see in this project : https://github.com/jameskbride/cmake-hello-world. +*Cmake* project are used to have a `CMakeLists.txt` file in many folders. And C project are used to have libraries notions inside a project as we can see in this project: https://github.com/jameskbride/cmake-hello-world. -### Exemple of possible refactorings for the project cmake-hello-world +### Example of possible refactorings for the project cmake-hello-world -In this project, a library 'hello' is used by the main file `helloWorld.cpp`. So, how is the good way to use this library ? There are three ways to do that : +In this project, a library 'hello' is used by the main file `helloWorld.cpp`. So, how is the good way to use this library? There are three ways to do that: #### **Use the library as a sources.** -First choice, you considere that the 'hello' library, as the 'helloword.cpp' file is a part of the project et must be placed inside as sources : +First choice, you considere that the 'hello' library, as the 'helloword.cpp' file is a part of the project et must be placed inside as sources: -**Exemple : A single gradle project** +**Example: A single gradle project** ```groovy cmake-hello-world @@ -152,7 +152,7 @@ Second choice, you considere that the 'hello' library has nothing to do with the Then in the project cmake-hello-world, use it as a dependency. -**Exemple : use hello dependency in the build.gradle file** +**Example: use hello dependency in the build.gradle file** ```groovy dependencies { compile ("com.example:hello-library:1.0@clib" @@ -161,9 +161,9 @@ dependencies { #### **Use this library as a sub-module project** -Third choice, The 'hello' library has nothing to in this project. but this library is close of the project. The project and the library are a part of the same product. In this case, It can be a good idea te create a gradle project for this product which contain sub-modules (the 'hello' library and the 'cmake-hello-world' project). +Third choice, the 'hello' library has nothing to in this project. but this library is close of the project. The project and the library are a part of the same product. In this case, It can be a good idea te create a gradle project for this product which contain sub-modules (the 'hello' library and the 'cmake-hello-world' project). -**Exemple : gradle multi-modules project** +**Example: gradle multi-modules project** ```groovy exemple-project |___settings.gradle @@ -187,7 +187,7 @@ dependencies { } ``` -#### **In Conclusion** : +#### **In Conclusion**: The gradle cpp plugin create a real notion of **Projects** and **libraries**. User of this plugins have to have in minds these notions when they create their projects configurations with usual C tools (Make, CMake…). @@ -203,7 +203,7 @@ The Java plugin adds a number of conventions properties to the project, shown be | ----------- | ---------- | ---------------- | -------------------------------| | cpp | CppPluginExtension | - | Contains the configuration of cpp | -**Exemple 2. Cpp extension exemple** +**Example 2. Cpp extension exemple** ```groovy cpp { @@ -215,12 +215,12 @@ cpp { | Name | Type | Default value | Description | | ----------- | ---------- | ---------------- | -------------------------------| -| applicationType | ApplicationType | ApplicationType.clibrary | Type of project : ApplicationType.clibrary or ApplicationType.capplication | +| applicationType | ApplicationType | ApplicationType.clibrary | Type of project: ApplicationType.clibrary or ApplicationType.capplication | | classifier | String | classifier | Allows to distinguish artifacts for a same version. | | buildTasksEnabled | boolean | true | Activates or desactivates the compileCpp, testCompileCpp, testCpp tasks | | exec | CppExecConfiguration | - | Configures the builds tasks | -**Exemple 4. Cpp extension exemple** +**Example 4. Cpp extension exemple** ```groovy cpp { @@ -245,7 +245,7 @@ cpp { | ${task.name}ExecWorkingDir | String | null | File location to execute the command launched by the task ${task.name} of type CppExecTask | | ${task.name}StandardOutput | OutputStream | null | Output stream used to store the result of the command launched by the task ${task.name} of type CppExecTask | -**Exemple 5. CppExecConfiguration exemple** +**Example 5. CppExecConfiguration example** ```groovy cpp { @@ -264,12 +264,12 @@ The clean task is an instance of Delete. It simply removes the directory denoted ## modules To simplify the configurations of the C build tools, some modules are provideds. At this time only cmake modules are provided. -Provided lists : +Provided lists: * [CMake modules](docs/modules/cmake-modules.md) -## Exemple of configuration with Cmake +## Example of configuration with Cmake -**Exemple 6. Exemple of build.gradle to use cmake** +**Example 6. Example of build.gradle to use cmake** ```groovy @@ -299,7 +299,7 @@ Then launch the build. > gradle build ``` -An exemple of console output. +An example of console output. ``` extern:externlib:clean From ab3d12630776996e5350227fb49498b42d0a9375 Mon Sep 17 00:00:00 2001 From: Basil Peace Date: Mon, 21 Aug 2017 23:36:49 +0300 Subject: [PATCH 2/2] Fix misspellings in README.md --- README.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 75f8660..86f8248 100644 --- a/README.md +++ b/README.md @@ -56,9 +56,9 @@ The cpp plugin adds a number of tasks to your project, as shown below. | Task name | Depends on | Type | Description | | ---------------- | -------------- | ------- | --------------------------------------------------------------- | | initOutputDirs | - | Task | Initializes structure folders in project.buildDir directory | -| downloadLibs | initOutputDirs | Task | Copies project dependencies in project.buildDir/extLib directtory | +| downloadLibs | initOutputDirs | Task | Copies project dependencies in project.buildDir/extLib directory | | compileCpp | downloadLibs | CppExecTask --> Exec | Compiles source code. Needs to be configured to launch the correct tool | -| testCompileCpp | compileCpp | CppExecTask --> Exec | Compile test source code. Needs to be configured te launch the correct tool | +| testCompileCpp | compileCpp | CppExecTask --> Exec | Compile test source code. Needs to be configured to launch the correct tool | | testCpp | testCompileCpp | CppExecTask --> Exec | Launches test. Needs to be configured to launch the correct tool | | distZip | compileCpp | Zip | Assembles the ZIP file if it is a c-application or a CLIB file if it is a c-library | | assemble | all archives task as distZip | Task | Assembles the outputs of this project | @@ -106,7 +106,7 @@ dependencies { *Gradle* is a **project** and **dependencies** manager. So, a gradle project must be seen as an **atomic project** which contains only: * sources in `src/main/headers` and `src/main/cpp` * test sources in `src/test/headers` and `src/test/cpp` -* configuration file (`build.gradle` and, for exemple with *CMake*,`CMakeLists.txt` locateds **only on the project root location**. +* configuration file (`build.gradle` and, for example with *CMake*,`CMakeLists.txt` located **only on the project root location**. The C building tool under *Gradle* have to be able to: * compile sources (with for example `make compile`) @@ -115,8 +115,8 @@ The C building tool under *Gradle* have to be able to: Projects examples can be found in the plugin source code in the `examples` folders. -**note:** at this time, I'm not a cmake expert. I do not succes to create all this make rules with *CMake*: I only manage to compile sources and test sources with the command `make` and launching test with the command `make test` using *ctest*. -If someone can tell me how to do this in the examples projects. All contributions will be appreciate: +**note:** at this time, I'm not a cmake expert. I do not succeed to create all this make rules with *CMake*: I only manage to compile sources and test sources with the command `make` and launching test with the command `make test` using *ctest*. +If someone can tell me how to do this in the example projects, all contributions will be appreciated. *Cmake* project are used to have a `CMakeLists.txt` file in many folders. And C project are used to have libraries notions inside a project as we can see in this project: https://github.com/jameskbride/cmake-hello-world. @@ -127,7 +127,7 @@ In this project, a library 'hello' is used by the main file `helloWorld.cpp`. So #### **Use the library as a sources.** -First choice, you considere that the 'hello' library, as the 'helloword.cpp' file is a part of the project et must be placed inside as sources: +First choice, you consider that the 'hello' library, as the 'helloworld.cpp' file is a part of the project that must be placed inside at sources: **Example: A single gradle project** @@ -142,13 +142,13 @@ cmake-hello-world | |___Speaker.h |___cpp/ |___Speaker.cpp - |___helloWord.cpp + |___helloWorld.cpp ``` #### **Use the library as an external dependency** -Second choice, you considere that the 'hello' library has nothing to do with the project. This library can be used by many projects, in many computers. So create a gradle project 'hello-library', place the souces inside, and upload it in an artifact reposotory manager as [Nexus](http://www.sonatype.com/nexus/product-overview) for example. +Second choice, you consider that the 'hello' library has nothing to do with the project. This library can be used by many projects, in many computers. So create a gradle project 'hello-library', place the sources inside, and upload it in an artifact repository manager as [Nexus](http://www.sonatype.com/nexus/product-overview) for example. Then in the project cmake-hello-world, use it as a dependency. @@ -161,11 +161,11 @@ dependencies { #### **Use this library as a sub-module project** -Third choice, the 'hello' library has nothing to in this project. but this library is close of the project. The project and the library are a part of the same product. In this case, It can be a good idea te create a gradle project for this product which contain sub-modules (the 'hello' library and the 'cmake-hello-world' project). +Third choice, the 'hello' library has nothing to in this project. but this library is close to the project. The project and the library are a part of the same product. In this case, It can be a good idea to create a gradle project for this product which contain sub-modules (the 'hello' library and the 'cmake-hello-world' project). **Example: gradle multi-modules project** ```groovy -exemple-project +example-project |___settings.gradle |___gradle.properties |___build.gradle @@ -191,19 +191,19 @@ dependencies { The gradle cpp plugin create a real notion of **Projects** and **libraries**. User of this plugins have to have in minds these notions when they create their projects configurations with usual C tools (Make, CMake…). -You can find the 3 possibles solutions in the 'exemplek folders in the source code. +You can find the 3 possibles solutions in the `exemples` folders in the source code. ## Extension properties The Java plugin adds a number of conventions properties to the project, shown below. You can use these properties in your build script as though they were properties of the project object. -**Table 3. Cpp plugin - Project projerties** +**Table 3. Cpp plugin - Project properties** | Name | Type | Default value | Description | | ----------- | ---------- | ---------------- | -------------------------------| | cpp | CppPluginExtension | - | Contains the configuration of cpp | -**Example 2. Cpp extension exemple** +**Example 2. Cpp extension example** ```groovy cpp { @@ -211,16 +211,16 @@ cpp { } ``` -**Table 4. Cpp plugin - CppPluginExtension projerties** +**Table 4. Cpp plugin - CppPluginExtension properties** | Name | Type | Default value | Description | | ----------- | ---------- | ---------------- | -------------------------------| | applicationType | ApplicationType | ApplicationType.clibrary | Type of project: ApplicationType.clibrary or ApplicationType.capplication | | classifier | String | classifier | Allows to distinguish artifacts for a same version. | -| buildTasksEnabled | boolean | true | Activates or desactivates the compileCpp, testCompileCpp, testCpp tasks | +| buildTasksEnabled | boolean | true | Activates or deactivates the compileCpp, testCompileCpp, testCpp tasks | | exec | CppExecConfiguration | - | Configures the builds tasks | -**Example 4. Cpp extension exemple** +**Example 4. Cpp extension example** ```groovy cpp { @@ -233,7 +233,7 @@ cpp { } ``` -**Table 5. Cpp plugin - CppExecConfiguration projerties** +**Table 5. Cpp plugin - CppExecConfiguration properties** | Name | Type | Default value | Description | | ----------- | ---------- | ---------------- | -------------------------------| @@ -262,7 +262,7 @@ cpp { The clean task is an instance of Delete. It simply removes the directory denoted by its ${project.buildDir} property. ## modules -To simplify the configurations of the C build tools, some modules are provideds. At this time only cmake modules are provided. +To simplify the configurations of the C build tools, some modules are provided. At this time only cmake modules are provided. Provided lists: * [CMake modules](docs/modules/cmake-modules.md)