Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

Commit

Permalink
Merge branch 'release/0.0.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasWanke committed Aug 12, 2019
2 parents d076c03 + e89a3bb commit 59894ae
Show file tree
Hide file tree
Showing 23 changed files with 1,295 additions and 15 deletions.
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/1-bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: "\U0001F41E Bug report"
about: Create a report to help us improve
title: ''
labels: 'T: fix'
assignees: ''

---

<!--
Thanks for taking the time to file an issue!
Please select the component label (C: abc) this bug is related to from the right.
-->

**Describe the bug**
<!-- A clear and concise description of what the bug is & how to reproduce it -->



**Environment:**
<!-- Please complete the following information -->
- Version: <!-- e.g. 0.3.0-alpha.1 -->
- Language: <!-- e.g. Dart -->
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/2-feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: "\U0001F680 Feature request"
about: Suggest an idea for this project
title: ''
labels: 'T: feat'
assignees: ''

---

<!--
Thanks for taking the time to file an issue!
Please select the component label (C: abc) this feature is related to from the right.
-->

**Description**
<!-- A clear and concise description of the problem or missing capability -->
18 changes: 18 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
**Fixes: #Issue**

<!--
- The name of this PR should follow conventionalcommits.org.
- When not using Unicorn to create PRs, please manually select a type (T: abc) label
from the right. Add the breaking label (PR: BREAKING) if applicable.
- Please enter the corresponding issue ID in the placeholder above.
-->

**Checklist**
<!-- Please check if your PR fulfills the following requirements: -->

- [ ] Commit messages follow conventionalcommits.org


**Changes**
<!-- Please summarize your changes -->

11 changes: 7 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
.github
gitignore.io help:
list - lists the operating systems, programming languages and IDE input types
:types: - creates .gitignore files for types of operating systems, programming languages or IDEs
# Generated files
src/
lib/proto/

# Gradle
.gradle
build
34 changes: 34 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
language: java
install: true

services:
- docker

jdk:
- oraclejdk8

script:
- cd ..
- git clone https://github.com/googleapis/api-common-protos.git
- rm -r ./api-common-protos/google/api/ ./api-common-protos/google/rpc/
- mkdir -p ./hpi-cloud-apis/src/main/java
- shopt -s globstar
- docker run --rm
-v $(pwd):$(pwd)
-w $(pwd)
thethingsindustries/protoc
--plugin=protoc-gen-grpc=/usr/bin/protoc-gen-grpc-java
--java_out=./hpi-cloud-apis/src/main/java
--grpc_out=./hpi-cloud-apis/src/main/java
--proto_path=./hpi-cloud-apis
--proto_path=./api-common-protos
./hpi-cloud-apis/**/*.proto
./api-common-protos/**/*.proto
- cd ./hpi-cloud-apis
- ./gradlew assemble

deploy:
- provider: script
script: ./gradlew bintrayUpload
on:
tags: true
4 changes: 2 additions & 2 deletions .unicornfig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ description: "This repository contains the original interface definitions of pub
\ definitions can provide a better understanding of HPI Cloud APIs and help you\
\ to utilize them more efficiently. You can also use these definitions with open\
\ source tools to generate client libraries, documentation, and other artifacts."
version: "0.0.1"
githubName: null
version: "0.0.3"
githubName: "HPI-de/hpi-cloud-apis"
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).


<!-- Template:
## [Unreleased] - 2019-xx-xx
### Added
### Changed
### Deprecated
### Removed
### Fixed
### Security
-->

## [Unreleased]


## [0.0.3] - 2019-08-12
### Added
- add documentation on how to generate Dart code
- **course:** add course definitions
- **food:** add food definitions
- **myhpi:** add MyHPI definitions

### Changed
- shorten GitHub templates
- **news:** shorten proto descriptions

## [0.0.2] - 2019-07-05
### Changed
- Updated library `com.google.protobuf:protobuf-java` to version 3.8.0.

## 0.0.1 - 2019-07-05
Initial release with NewsService.


[Unreleased]: https://github.com/HPI-de/hpi-cloud-apis/compare/0.0.3...dev
[0.0.3]: https://github.com/HPI-de/hpi-cloud-apis/compare/0.0.2...0.0.3
[0.0.2]: https://github.com/HPI-de/hpi-cloud-apis/compare/0.0.1...0.0.2
95 changes: 86 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,97 @@
# hpi-cloud-apis

[![Build Status](https://travis-ci.com/HPI-de/hpi-cloud-apis.svg?branch=dev)](https://travis-ci.com/HPI-de/hpi-cloud-apis)
[![Download](https://api.bintray.com/packages/hpi/hpi-cloud-mvn/hpi-cloud/images/download.svg)](https://bintray.com/hpi/hpi-cloud-mvn/hpi-cloud/_latestVersion)

This repository contains the original interface definitions of public HPI Cloud APIs that support the gRPC protocol. Reading the original interface definitions can provide a better understanding of HPI Cloud APIs and help you to utilize them more efficiently. You can also use these definitions with open source tools to generate client libraries, documentation, and other artifacts.

These [Protocol Buffers](https://developers.google.com/protocol-buffers/) define the structure used for persistence.


> **Note:** All of the following commands should be executed from within this folder.

## Generate source code

> **Note:** The following guide was only tested on Linux (Ubuntu).
<details>
<summary>Install protoc</summary>

Download release `protoc-<VERSION>-linux-x86_64.zip` from https://github.com/protocolbuffers/protobuf/releases

```sh
sudo apt install autoconf automake libtool curl make g++ unzip
unzip protoc-<VERSION>-linux-x86_64.zip -d protoc3
sudo mv protoc3/bin/* /usr/local/bin/
sudo mv protoc3/include/* /usr/local/include/
sudo chown $USER /usr/local/bin/protoc
sudo chown -R $USER /usr/local/include/google
```
</details>

<details>
<summary>Install Dart</summary>

Source: <https://dart.dev/get-dart>

```sh
sudo apt update
sudo apt install apt-transport-https
sudo sh -c 'curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -'
sudo sh -c 'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'
sudo apt update
sudo apt install dart
export PATH=$PATH:/usr/lib/dart/bin
```
</details>

<details>
<summary>Install protoc plugin for Dart</summary>

Source: <https://grpc.io/docs/quickstart/dart>

```sh
pub global activate protoc_plugin
export PATH=$PATH:$HOME/.pub-cache/bin
```
</details>

<details>
<summary>Download Google Common Protos</summary>

```sh
git clone https://github.com/googleapis/api-common-protos.git ../api-common-protos
```
</details>


### Dart

```sh
shopt -s globstar
rm -rf ./lib/proto
mkdir -p ./lib/proto
protoc --proto_path=. \
--proto_path=../api-common-protos \
--dart_out=grpc:./lib/proto \
./hpi/**/*.proto \
../api-common-protos/**/*.proto
```


## License

Copyright 2019 hpi-cloud-apis

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
96 changes: 96 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
plugins {
id 'java-library'
id "maven-publish"
id "com.jfrog.bintray" version "1.8.4"
}

repositories {
mavenLocal()
jcenter()
}
dependencies {
api("com.google.protobuf:protobuf-java:3.8.0")
// implementation as Android clients will replace this with grpc-protobuf-lite
implementation("io.grpc:grpc-protobuf:1.21.0")
api("io.grpc:grpc-stub:1.21.0")
// implementation as Android clients will replace this with grpc-okhttp
implementation("io.grpc:grpc-netty:1.21.0")
}

// Publishing config
ext {
bintrayOrg = 'hpi'
bintrayRepo = 'hpi-cloud-mvn'
bintrayName = 'hpi-cloud'

publishedGroupId = 'de.hpi.cloud'
artifact = 'hpi-cloud'

description = "Auto-generated client libraries for HPI Cloud"

siteUrl = 'https://github.com/HPI-de/hpi-cloud-apis'
issueUrl = 'https://github.com/HPI-de/hpi-cloud-apis/issues'
gitUrl = 'https://github.com/HPI-de/hpi-cloud-apis.git'
githubRepository = 'HPI-de/hpi-cloud-apis'
githubReleaseNotes = 'CHANGELOG.md'
allLicenses = ["Apache-2.0"]

libraryVersion = "0.0.3"
}

task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
javadoc.failOnError = false
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
publishing {
publications {
all(MavenPublication) {
from components.java
artifact sourcesJar {
classifier "sources"
}
artifact javadocJar {
classifier "javadoc"
}

groupId publishedGroupId
artifactId artifact
version libraryVersion
}
}
}
bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')

publications = ["all"]
publish = true
pkg {
repo = bintrayRepo
name = bintrayName
userOrg = bintrayOrg
desc = description
websiteUrl = siteUrl
issueTrackerUrl = issueUrl
vcsUrl = gitUrl
licenses = allLicenses

githubRepo = githubRepository
githubReleaseNotesFile = githubReleaseNotes

version {
name = libraryVersion
vcsTag = libraryVersion
}
}
}
bintrayUpload.dependsOn generatePomFileForAllPublication
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 59894ae

Please sign in to comment.