Skip to content

Commit b5cd2a7

Browse files
committed
Reword the sample wording
1 parent 16597ac commit b5cd2a7

File tree

1 file changed

+13
-17
lines changed
  • subprojects/platform-native/src/docs/sample-templates/native-component-with-custom-source-layout

1 file changed

+13
-17
lines changed
Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,30 @@
11
= {C Application} Custom Source Layout Configuration
2-
:summary: Configure custom source layout for a {C application}.
2+
:summary: Set custom source layout for a {C application}.
33
:type: sample-chapter
44
:tags: sample, {application}, sources, native, {C}, gradle
55
:category: {C}
66
:description: See how to customize the source layout of {an application} implemented in {C} using the Gradle Nokee plugins.
77

88
NOTE: You can open this sample inside an IDE using the https://www.jetbrains.com/help/idea/gradle.html#gradle_import_project_start[IntelliJ native importer] or https://projects.eclipse.org/projects/tools.buildship[Eclipse Buildship].
99

10-
This sample shows how to configure the source layout of a {C application}.
11-
The library has no dependencies, and the build has a minimal configuration.
12-
13-
In this sample, we are configuring source layout of {an application} implemented in {C}; however, this applies to other native components and languages as well.
14-
10+
Here is a sample where we configure the source layout of {an application} implemented in {C} with no dependencies and minimal configuration.
1511
[source,groovy]
1612
----
1713
plugins {
18-
id 'dev.nokee.c-application'
14+
id 'dev.nokee.c-application' // <1>
1915
}
2016

2117
application {
22-
cSources.setFrom('srcs') // <1>
23-
privateHeaders.setFrom('incs') // <2>
18+
cSources.setFrom('srcs') // <2>
19+
privateHeaders.setFrom('incs') // <3>
2420
}
2521

2622
----
27-
<1> Configure C sources to include everything under `srcs` directory.
28-
<2> Configure private headers to include everything under `incs` directory.
23+
<1> Apply the C application plugin.
24+
<2> Set C sources to include everything under `srcs` directory.
25+
<3> Set private headers to include everything under `incs` directory.
2926
30-
To build the application:
27+
Build the application:
3128
3229
[source,terminal]
3330
----
@@ -36,19 +33,18 @@ $ ./gradlew assemble
3633
BUILD SUCCESSFUL
3734
4 actionable tasks: 4 executed
3835
----
39-
40-
If we create invalid source code at the conventional location and rebuild the application, as expected, the build succeeds.
41-
36+
Setting the sources layout will exclude the conventional sources location as per example below.
4237
[source,terminal]
4338
----
44-
$ mkdir -p src/main/cpp
45-
$ echo "broken!" > src/main/cpp/broken.cpp
39+
$ mkdir -p src/main/c
40+
$ echo "broken!" > src/main/c/broken.c
4641
$ mkdir -p src/main/headers
4742
$ echo "broken!" > src/main/headers/greeter.h
4843
$ ./gradlew clean assemble
4944

5045
BUILD SUCCESSFUL
5146
5 actionable tasks: 5 executed
5247
----
48+
It can also be applied to other native components and languages : link other example here
5349

5450
For more information, see link:working-with-source-files.adoc[working with source files chapter].

0 commit comments

Comments
 (0)