Skip to content

Commit

Permalink
Create version v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mattbdean committed Jan 1, 2018
1 parent b82b35c commit 6489cb3
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 26 deletions.
2 changes: 1 addition & 1 deletion ENDPOINTS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!--- Generated 2017-12-27 at 14:43:13 EET. Use `./gradlew :meta:update` to update. DO NOT MODIFY DIRECTLY -->
<!--- Generated 2017-12-30 at 21:21:42 EST. Use `./gradlew :meta:update` to update. DO NOT MODIFY DIRECTLY -->

Endpoints
=========
Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@
[![API coverage](https://img.shields.io/badge/API_coverage-44%25-9C27B0.svg)](https://github.com/thatJavaNerd/JRAW/blob/master/ENDPOINTS.md)
[![Codecov branch](https://img.shields.io/codecov/c/github/mattbdean/JRAW.svg)](https://codecov.io/gh/mattbdean/JRAW)

> JRAW is currently being rewritten in [Kotlin](https://kotlinlang.org/) for v1.0.0 (see [#187](https://github.com/mattbdean/JRAW/issues/187)). If you'd like to try it out before the official release, please use [Jitpack](https://jitpack.io/#mattbdean/JRAW/master-SNAPSHOT).
```groovy
repositories {
maven { url 'https://jitpack.io' }
jcenter()
}
dependencies {
implementation 'com.github.mattbdean:JRAW:master-SNAPSHOT'
implementation "net.dean.jraw:JRAW:$jrawVersion"
}
```

Expand Down Expand Up @@ -43,7 +41,7 @@ JRAW uses JitPack to host its Javadoc.
https://jitpack.io/com/github/mattbdean/JRAW/VERSION/javadoc/index.html
```

`VERSION` can be a specific commit hash (like [`d6843bf`](https://jitpack.io/com/github/mattbdean/JRAW/d6843bf/javadoc/index.html)), a tag (like [`v0.9.0`](https://jitpack.io/com/github/mattbdean/JRAW/v0.9.0/javadoc/index.html)), or the HEAD of a branch (like [`master-SNAPSHOT`](https://jitpack.io/com/github/mattbdean/JRAW/master-SNAPSHOT/javadoc/index.html)).
`VERSION` can be a specific commit hash (like [`d6843bf`](https://jitpack.io/com/github/mattbdean/JRAW/d6843bf/javadoc/index.html)), a tag (like [`v1.0.0`](https://jitpack.io/com/github/mattbdean/JRAW/v1.0.0/javadoc/index.html)), or the HEAD of a branch (like [`master-SNAPSHOT`](https://jitpack.io/com/github/mattbdean/JRAW/master-SNAPSHOT/javadoc/index.html)).

JitPack produces Javadoc only when necessary, so the first time someone accesses the Javadoc for a specific build it may take a little bit.

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ subprojects {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
group = 'net.dean.jraw'
version = '0.9.0'
version = '1.0.0'

repositories {
jcenter()
Expand Down
20 changes: 11 additions & 9 deletions buildSrc/src/main/groovy/net/dean/jraw/gradle/GitbookPush.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ class GitbookPush extends DefaultTask {

@TaskAction
void pushToRemote() {
String shortName = getLatestCommit().name().substring(0, 8)
String commitMessage = "Update documentation from commit ${shortName}\n\n" +
"See https://github.com/mattbdean/JRAW/commit/${shortName}"

this.git = GitbookHelper.clone(repository, username, password)
log("Cloned repository $repository to ${git.repository.directory.absolutePath}")

Expand All @@ -63,13 +59,9 @@ class GitbookPush extends DefaultTask {
GitbookHelper.createTag(git, "v${project.version}")

if (hasNew)
commit(commitMessage)
commit(commitMessage(this.createVersionTag))

push()
}

@TaskAction
void cleanUp() {
this.git.repository.directory.deleteDir()
}

Expand All @@ -81,6 +73,16 @@ class GitbookPush extends DefaultTask {
.first()
}

private String commitMessage(boolean createVersionTag) {
if (createVersionTag) {
return "Update documentation for version v${project.version}"
} else {
String shortName = getLatestCommit().name().substring(0, 8)
return "Update documentation from commit ${shortName}\n\n" +
"See https://github.com/mattbdean/JRAW/commit/${shortName}"
}
}

private void copyBook(File dest) {
// Recursively copy all files from the compiled book directory to the given destination
Files.walkFileTree(compiledBookDir.toPath(), new CopyDirVisitor(compiledBookDir.toPath(), dest.toPath()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class VersionCommitTask extends DefaultTask {

this.git.commit()
.setAuthor("Matthew Dean", "[email protected]")
.setMessage("Create version ${project.version}")
.setMessage("Create version v${project.version}")
.setAllowEmpty(false)
.call()
}
Expand Down
6 changes: 5 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# JRAW Documentation

This is a meta-project dedicated to generating Markdown files to be hosted on [GitBook](https://mattbdean.gitbooks.io/jraw), which will be available with the release of JRAW [v1.0.0](https://github.com/mattbdean/JRAW/milestone/3).
This is a meta-project dedicated to generating Markdown files to be hosted on [GitBook](https://mattbdean.gitbooks.io/jraw).

The integration tests require [gitbook-cli](https://github.com/GitbookIO/gitbook-cli) to be installed globally.

```
$ npm install --global gitbook-cli
```

## TL;DR

```
Expand Down
15 changes: 8 additions & 7 deletions lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ ext.projectName = 'JRAW'
dependencies {
compile "com.squareup.okhttp3:okhttp:$okhttpVersion"

// TODO: Use jitpack for Moshi until square/moshi#349 and #350 are merged to handle deeply nested objects
// TODO: Use Moshi fork until square/moshi#349 and #350 are merged to handle deeply nested objects:
// https://bintray.com/thatjavanerd/maven/moshi-deeply-nested
// compile "com.squareup.moshi:moshi:$moshiVersion"
def moshi = "com.github.mattbdean.moshi:moshi:349-deeply-nested-value-reader-SNAPSHOT"
def moshi = 'net.dean.jraw:moshi-deeply-nested:1.0.0'
compile(moshi) {
exclude group: 'com.squareup.moshi'
}
Expand Down Expand Up @@ -83,8 +84,8 @@ artifacts {
}

bintray {
user = hasProperty("bintrayUser") ? bintrayUser : null
key = hasProperty("bintrayKey") ? bintrayKey : null
user = project.hasProperty("bintrayUser") ? bintrayUser : null
key = project.hasProperty("bintrayKey") ? bintrayKey : null
pkg {
repo = 'maven'
name = projectName
Expand All @@ -94,7 +95,7 @@ bintray {
githubRepo = 'mattbdean/JRAW'

version {
name = "v${project.version}"
name = project.version
released = new Date()
vcsTag = "v${project.version}"
}
Expand All @@ -106,8 +107,8 @@ bintray {

// Pushes any new changes to GitBook and creates a version tag for the new version
task pushReleaseDocs(type: GitbookPush, dependsOn: [':docs:buildSite']) {
username hasProperty("gitbookUsername") ? gitbookUsername : null
password hasProperty("gitbookPassword") ? gitbookPassword : null
username project.hasProperty("gitbookUsername") ? gitbookUsername : null
password project.hasProperty("gitbookPassword") ? gitbookPassword : null
repository "https://git.gitbook.com/mattbdean/jraw.git"
compiledBookDir rootProject.project('docs').file("build/docs").absoluteFile
createVersionTag true
Expand Down
2 changes: 1 addition & 1 deletion lib/src/gen/java/net/dean/jraw/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* For JRAW developers: this class should not be edited by hand. This class can be regenerated through the {@code :meta:update} Gradle task. */
public final class Version {
private static final String version = "0.9.0";
private static final String version = "1.0.0";

/**
* A semver string like "1.2.3" */
Expand Down

0 comments on commit 6489cb3

Please sign in to comment.