Skip to content

Commit

Permalink
Add CONTRIBUTE.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dim-s committed May 2, 2018
1 parent 5be4901 commit 44af2d2
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
51 changes: 51 additions & 0 deletions CONTRIBUTE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@

## Contributing

1. Install JDK 8+
2. Install Gradle 4+ or use gradle wrapper (`gradlew`).
3. Build and Install JPPM from sources:
```bash
gradle packager:install
```

### `Optional` Publish jphp packages to local repo.

```bash
gradle localPublish
```

### `Optional` Publish jphp packages to hub repo (develnext.org).

1. You need to login:
```
jppm hub:login
```

2. Publish All!
```
gradle hubPublish
```

or only one:

2. Publish package:
```
gradle hubPublish -p exts/jphp-mysql-ext
```

### `Optional` Build api docs for packages
```
gradle docBuild # for all
gradle docBuild -p jphp-runtime # for one!
gradle docBuild -p exts/jphp-mysql-ext # for extension!
```

> API docs will be in the `api-docs` directory.
### `Optional` Use sandbox gradle project to test jphp!

```
gradle sandbox:run
```

> The `sandbox/src` directory contains the all php sources.
16 changes: 16 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,22 @@ configure(subprojects) {
jppmDist(project)
}
}

task localPublish(type: Exec, dependsOn: [docBuild, jar]) {
def cmdArgs = ['jppm', 'publish', '-yes', '-force']

if (System.getProperty("os.name").toLowerCase().contains("windows")) {
cmdArgs.add(0, "/c");
cmdArgs.add(0, "cmd");
}

commandLine cmdArgs
workingDir = project.buildDir.path + "/jppm/dist"

doFirst {
jppmDist(project)
}
}
}

def extDir = "exts/";
Expand Down

0 comments on commit 44af2d2

Please sign in to comment.