Skip to content

Commit c1ee76d

Browse files
authored
Improve project structure (#52)
* Improve project structure #43 * Improve project structure #43 * Configs in "graphqlSchemas" should be optional #51 * Add missing file #43 * Fix module name #43
1 parent b7ba73f commit c1ee76d

File tree

47 files changed

+52
-616
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+52
-616
lines changed

.circleci/config.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55
Build core library
66
docker:
77
- image: circleci/openjdk:8-jdk
8-
working_directory: ~/repo/graphql-java-codegen
8+
working_directory: ~/repo
99
environment:
1010
JVM_OPTS: -Xmx3200m
1111
TERM: dumb
@@ -36,7 +36,7 @@ jobs:
3636
Build maven plugin
3737
docker:
3838
- image: circleci/openjdk:8-jdk
39-
working_directory: ~/repo/graphql-java-codegen-maven-plugin
39+
working_directory: ~/repo
4040
environment:
4141
MAVEN_OPTS: -Xmx3200m
4242
steps:
@@ -50,21 +50,24 @@ jobs:
5050
- deps-{{checksum ".circle-cache-key"}}
5151
- run:
5252
name: Load all dependencies
53-
command: cd plugins/graphql-java-codegen-maven-plugin && mvn dependency:go-offline
53+
command: cd ~/repo/plugins/maven/graphql-java-codegen-maven-plugin && mvn dependency:go-offline
5454
- save_cache:
5555
paths:
5656
- ~/.gradle
5757
- ~/.m2
5858
key: deps-{{checksum ".circle-cache-key"}}
5959
- run:
6060
name: Build and run unit tests
61-
command: cd plugins/graphql-java-codegen-maven-plugin && mvn package
61+
command: cd ~/repo/plugins/maven/graphql-java-codegen-maven-plugin && mvn install
62+
- run:
63+
name: Build example project
64+
command: cd ~/repo/plugins/maven/example && mvn package
6265
build-graphql-java-codegen-gradle-plugin:
6366
description:
6467
Build gradle plugin
6568
docker:
6669
- image: circleci/openjdk:8-jdk
67-
working_directory: ~/repo/graphql-java-codegen-gradle-plugin
70+
working_directory: ~/repo
6871
environment:
6972
JVM_OPTS: -Xmx3200m
7073
TERM: dumb
@@ -79,15 +82,18 @@ jobs:
7982
- deps-{{checksum ".circle-cache-key"}}
8083
- run:
8184
name: Load all dependencies
82-
command: cd plugins/graphql-java-codegen-gradle-plugin && gradle dependencies
85+
command: cd ~/repo/plugins/gradle/graphql-java-codegen-gradle-plugin && gradle dependencies
8386
- save_cache:
8487
paths:
8588
- ~/.gradle
8689
- ~/.m2
8790
key: deps-{{checksum ".circle-cache-key"}}
8891
- run:
8992
name: Build and run unit tests
90-
command: cd plugins/graphql-java-codegen-gradle-plugin && gradle test
93+
command: cd ~/repo/plugins/gradle/graphql-java-codegen-gradle-plugin && gradle build publishToMavenLocal
94+
- run:
95+
name: Build example project
96+
command: cd ~/repo/plugins/gradle/example && gradle test
9197
workflows:
9298
build-library-and-plugins:
9399
jobs:

CONTRIBUTING.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,18 @@ Please follow the steps below in order to make the changes:
2222

2323
```shell script
2424
# This will install the library (including your recent changes) in your local maven repository.
25-
./gradlew clean build publishToMavenLocal
25+
gradle clean build publishToMavenLocal
2626
```
2727

2828
4. Build the plugin project with updated `graphql-java-codegen` library.
2929

3030
```shell script
3131
# Build Gradle plugin
32-
cd plugins/graphql-java-codegen-gradle-plugin/graphql-codegen-gradle-plugin
33-
./gradlew clean build
32+
cd plugins/gradle/graphql-java-codegen-gradle-plugin
33+
gradle clean build
3434

3535
# Build Maven plugin
36-
cd plugins/graphql-java-codegen-maven-plugin
36+
cd plugins/maven/graphql-java-codegen-maven-plugin
3737
mvn clean verify
3838
```
3939

@@ -42,11 +42,11 @@ Please follow the steps below in order to make the changes:
4242

4343
```shell script
4444
# Install Gradle plugin
45-
cd plugins/graphql-java-codegen-gradle-plugin/graphql-codegen-gradle-plugin
46-
./gradlew clean build publishToMavenLocal
45+
cd plugins/gradle/graphql-java-codegen-gradle-plugin
46+
gradle clean build publishToMavenLocal
4747

4848
# Install Maven plugin
49-
cd plugins/graphql-java-codegen-maven-plugin
49+
cd plugins/maven/graphql-java-codegen-maven-plugin
5050
mvn clean install
5151
```
5252

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
## Plugins
88

99
Please refer to:
10-
* Gradle plugin: [graphql-java-codegen-gradle-plugin](plugins/graphql-java-codegen-gradle-plugin)
11-
* Maven plugin: [grapqhl-java-codegen-maven-plugin](plugins/graphql-java-codegen-maven-plugin)
10+
* Gradle plugin: [graphql-java-codegen-gradle-plugin](plugins/gradle)
11+
* Maven plugin: [grapqhl-java-codegen-maven-plugin](plugins/maven)
1212

1313

1414
## Contributing

gradle/wrapper/gradle-wrapper.jar

-54.3 KB
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 0 additions & 5 deletions
This file was deleted.

gradlew

Lines changed: 0 additions & 188 deletions
This file was deleted.

0 commit comments

Comments
 (0)