Skip to content

Commit

Permalink
Release prepare for 0.0.1 (#1)
Browse files Browse the repository at this point in the history
* Test github action

* Fix typo

* Fix typo

* Update action version

* Add snapshot repository

* Add dependency repositories

* Update dependency repositories

* Update action version

* Add publish plugin workflow

* Upgrade action version

* Remove publish plugins step from common publish workflow

* Upgrade 'com.gradle.plugin-publish' plugin to 0.11.0

* Add sign for project plugin

* Upgrade prepare action version

* Add more pom info

* Add description for projects

* Add badge

* Add developer info

* Add pom info for plugin

* Add portal as default dependency repository

* Manage all dependencies version by bom

* Upgrade version of dependencies

* Upgrade gradle version to 6.4.1

* Upgrade sisyphus component to 0.0.1-M6
  • Loading branch information
devkanro authored May 20, 2020
1 parent 59e9ae3 commit d7a19dc
Show file tree
Hide file tree
Showing 42 changed files with 362 additions and 74 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Check

on:
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.11
uses: actions/setup-java@v1
with:
java-version: 1.11
- uses: ButterCam/prepare-sisyphus-build@bc33e0b
with:
dependency: nexus
nexus-url: ${{ secrets.NEXUS_PUBLIC_URL }}
nexus-username: ${{ secrets.NEXUS_USERNAME }}
nexus-password: ${{ secrets.NEXUS_PASSWORD }}
- name: Build with Gradle
run: gradle build
50 changes: 50 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Publish

on:
push:
branches: [ master ]
release:
types: [ created ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.11
uses: actions/setup-java@v1
with:
java-version: 1.11
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v2
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
- uses: ButterCam/prepare-sisyphus-build@bc33e0b
with:
snapshot: snapshot,mavenSnapshot
release: release,mavenRelease
dependency: nexus
nexus-url: ${{ secrets.NEXUS_PUBLIC_URL }}
nexus-username: ${{ secrets.NEXUS_USERNAME }}
nexus-password: ${{ secrets.NEXUS_PASSWORD }}
snapshot-url: ${{ secrets.NEXUS_SNAPSHOT_URL }}
snapshot-username: ${{ secrets.NEXUS_USERNAME }}
snapshot-password: ${{ secrets.NEXUS_PASSWORD }}
mavenSnapshot-url: https://oss.sonatype.org/content/repositories/snapshots
mavenSnapshot-username: ${{ secrets.OSSRH_USERNAME }}
mavenSnapshot-password: ${{ secrets.OSSRH_PASSWORD }}
release-url: ${{ secrets.NEXUS_RELEASE_URL }}
release-username: ${{ secrets.NEXUS_USERNAME }}
release-password: ${{ secrets.NEXUS_PASSWORD }}
mavenRelease-url: https://oss.sonatype.org/service/local/staging/deploy/maven2
mavenRelease-username: ${{ secrets.OSSRH_USERNAME }}
mavenRelease-password: ${{ secrets.OSSRH_PASSWORD }}
gradle-portal-key: ${{ secrets.GRADLE_PUBLISH_KEY }}
gradle-portal-secret: ${{ secrets.GRADLE_PUBLISH_SECRET }}
gpg-key-name: ${{ secrets.GPG_KEY_NAME }}
- name: Publish with Gradle
run: gradle publish
34 changes: 34 additions & 0 deletions .github/workflows/publishplugins.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish Plugins

on:
release:
types: [ created ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.11
uses: actions/setup-java@v1
with:
java-version: 1.11
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v2
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
- uses: ButterCam/prepare-sisyphus-build@bc33e0b
with:
dependency: nexus
nexus-url: ${{ secrets.NEXUS_PUBLIC_URL }}
nexus-username: ${{ secrets.NEXUS_USERNAME }}
nexus-password: ${{ secrets.NEXUS_PASSWORD }}
gradle-portal-key: ${{ secrets.GRADLE_PUBLISH_KEY }}
gradle-portal-secret: ${{ secrets.GRADLE_PUBLISH_SECRET }}
gpg-key-name: ${{ secrets.GPG_KEY_NAME }}
- name: Publish plugins to Gradle Portal
run: gradle publishPlugins
30 changes: 30 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.gradle
/build/
!foundation/gradle/wrapper/gradle-wrapper.jar

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr

### NetBeans ###
nbproject/private/
build/
nbbuild/
dist/
nbdist/
.nb-gradle/

logs/
out/
data/elasticsearch
.DS_Store
16 changes: 9 additions & 7 deletions ReadMe.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Sisyphus

Sisyphus is the way how we provide backend services. It integrates all tools and libraries needed for designing API which follows the [Google API Improvement Proposals](https://aip.bybutter.com).
[![Maven Central](https://img.shields.io/maven-central/v/com.bybutter.sisyphus/sisyphus-bom)](https://mvnrepository.com/artifact/com.bybutter.sisyphus/sisyphus-bom)

Sisyphus is the way how we provide backend services. It integrates all tools and libraries needed for designing API which follows the [Google API Improvement Proposals](https://aip.bybutter.com).

## We are rolling a huge boulder

Due to we can analyzing product documents completely, it is not particularly difficult to write an exquisite and easy-to-use API at the beginning for most APIs.
Due to we can analyze product documents completely, it is not particularly difficult to write an exquisite and easy-to-use API at the beginning for most APIs.

But many people will break the initial design of the API in the endless update of products.
However, many people will break the initial design of the API in the endless update of products.

It's hard to create a strong and extensible API in the whole project lifetime, just like roll a huge boulder endlessly up a steep hill.

Expand All @@ -24,19 +26,19 @@ Choosing good tools can help you 'rolling a huge boulder' faster and easier. Sis

[**gRPC**](https://grpc.io/) is our target API framework, and Sisyphus also provides the [HTTP and gRPC Transcoding](https://aip.bybutter.com/127) component for the environment which not compatible with gRPC.

[**Sisyphus Protobuf**](/lib/sisyphus-protobuf) is our customized protobuf runtime, it design for Kotlin.
[**Sisyphus Protobuf**](/lib/sisyphus-protobuf) is our customized protobuf runtime, it designed for Kotlin.

[**Sisyphus gRPC**](/lib/sisyphus-grpc) is our customized gRPC runtime, it design for Kotlin coroutine.
[**Sisyphus gRPC**](/lib/sisyphus-grpc) is our customized gRPC runtime, it designed for Kotlin coroutine.

[**Sisyphus DTO**](/lib/sisyphus-dto) is our way to create structs without protobuf.
[**Sisyphus DTO**](/lib/sisyphus-dto) is our way to create struct without protobuf.

[**Sisyphus Middleware**](/middleware) is our way to connect Sisyphus and other system.

[**Sisyphus Configuration Artifact**](/middleware/sisyphus-configuration-artifact) is our way to manage configurations and developing environment.

[**Sisyphus Protobuf Compiler**](/tools/sisyphus-protoc) is our way to generate Kotlin codes by `.proto` files.

[**Sisyphus Project Plugin**](/tools/sisyphus-project-gradle-plugin) is our way to manage project and configurating Gradle.
[**Sisyphus Project Plugin**](/tools/sisyphus-project-gradle-plugin) is our way to manage project and configuring Gradle.

[**Sisyphus Protobuf Plugin**](/tools/sisyphus-protobuf-gradle-plugin) is our way to generate code by `.proto` files in Gradle.

Expand Down
4 changes: 3 additions & 1 deletion bom/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
plugins {
`java-platform`
id("nebula.maven-publish")
id("sisyphus.project")
sisyphus
}

group = "com.bybutter.sisyphus"
description = "Sisyphus Project (Bill of Materials)"


dependencies {
constraints {
Expand Down
21 changes: 21 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
plugins {
id("nebula.contacts")
}

contacts {
addPerson("[email protected]", delegateClosureOf<nebula.plugin.contacts.Contact> {
moniker = "higan"
github = "devkanro"
roles.add("owner")
})
addPerson("[email protected]", delegateClosureOf<nebula.plugin.contacts.Contact> {
moniker = "wangzheng"
github = "GuoDuanLZ"
roles.add("maintainer")
})
addPerson("[email protected]", delegateClosureOf<nebula.plugin.contacts.Contact> {
moniker = "future"
github = "yuxin-zhao"
roles.add("maintainer")
})
}
23 changes: 13 additions & 10 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,22 @@ plugins {
`java-library`
`kotlin-dsl`
id("idea")
id("sisyphus.project") version "higan-SNAPSHOT"
id("com.bybutter.sisyphus.project") version "0.0.1-M6"
}

dependencies {
implementation(platform("com.bybutter.sisyphus:sisyphus-bom:higan-SNAPSHOT"))
implementation(platform("com.bybutter.sisyphus:sisyphus-dependencies:0.0.1-M6"))
implementation("com.bybutter.sisyphus.tools:sisyphus-protobuf-gradle-plugin")
implementation("com.bybutter.sisyphus.tools:sisyphus-project-gradle-plugin")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.70")
implementation("org.jetbrains.kotlin:kotlin-allopen:1.3.70")
implementation("org.springframework.boot:spring-boot-gradle-plugin:2.2.7.RELEASE")
implementation("org.jlleitschuh.gradle:ktlint-gradle:9.2.1")
implementation("com.github.ben-manes:gradle-versions-plugin:0.27.0")
implementation("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.0.0-RC15")
implementation("com.netflix.nebula:nebula-publishing-plugin:17.2.1")
implementation("org.gradle.kotlin:plugins:1.2.11")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin")
implementation("org.jetbrains.kotlin:kotlin-allopen")
implementation("org.springframework.boot:spring-boot-gradle-plugin")
implementation("org.jlleitschuh.gradle:ktlint-gradle")
implementation("com.github.ben-manes:gradle-versions-plugin")
implementation("com.netflix.nebula:nebula-publishing-plugin")
implementation("com.netflix.nebula:gradle-contacts-plugin")
implementation("com.netflix.nebula:gradle-info-plugin")
implementation("org.gradle.kotlin:plugins")
implementation("com.gradle.publish:plugin-publish-plugin")
implementation("org.eclipse.jgit:org.eclipse.jgit")
}
6 changes: 0 additions & 6 deletions buildSrc/settings.gradle.kts

This file was deleted.

1 change: 0 additions & 1 deletion buildSrc/src/main/kotlin/kotlin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ val Project.kotlin: Project
apply {
plugin("kotlin")
plugin("kotlin-spring")
plugin("io.gitlab.arturbosch.detekt")
plugin("org.jlleitschuh.gradle.ktlint")
}

Expand Down
10 changes: 2 additions & 8 deletions buildSrc/src/main/kotlin/plugin.kt
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
inline val org.gradle.plugin.use.PluginDependenciesSpec.protobuf: org.gradle.plugin.use.PluginDependencySpec
get() = id("sisyphus.protobuf")
get() = id("com.bybutter.sisyphus.protobuf")

inline val org.gradle.plugin.use.PluginDependenciesSpec.sisyphus: org.gradle.plugin.use.PluginDependencySpec
get() = id("sisyphus.project")

inline val org.gradle.plugin.use.PluginDependenciesSpec.publish: org.gradle.plugin.use.PluginDependencySpec
get() {
id("nebula.maven-base-publish")
return id("nebula.source-jar")
}
get() = id("com.bybutter.sisyphus.project")
38 changes: 25 additions & 13 deletions dependencies/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,40 +1,52 @@
plugins {
`java-platform`
id("nebula.maven-publish")
id("sisyphus.project")
sisyphus
}

group = "com.bybutter.sisyphus"
description = "Dependencies of Sisyphus Project (Bill of Materials)"

javaPlatform {
allowDependencies()
}

dependencies {
api(platform(project(":sisyphus-bom")))
api(platform("org.springframework.boot:spring-boot-dependencies:2.2.7.RELEASE"))
api(platform("org.jetbrains.kotlin:kotlin-bom:1.3.70"))
api(platform("org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.3.6"))
api(platform("org.springframework.boot:spring-boot-dependencies:2.3.0.RELEASE"))
api(platform("org.jetbrains.kotlin:kotlin-bom:1.3.72"))
api(platform("org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.3.7"))
api(platform("org.apache.maven:maven:3.6.3"))
api(platform("io.grpc:grpc-bom:1.29.0"))
api(platform("com.google.protobuf:protobuf-bom:3.11.4"))
api(platform("com.google.protobuf:protobuf-bom:3.12.0"))

constraints {
api("com.squareup:kotlinpoet:1.5.0")
api("org.elasticsearch.client:transport:5.6.3")
api("com.aliyun.hbase:alihbase-client:2.0.3")
api("org.reflections:reflections:0.9.11")
api("org.reflections:reflections:0.9.12")
api("com.github.os72:protoc-jar:3.11.4")
api("io.netty:netty-tcnative-boringssl-static:2.0.20.Final")
api("org.apache.maven.wagon:wagon-http:3.3.4")
api("org.junit.jupiter:junit-jupiter:5.5.1")
api("io.netty:netty-tcnative-boringssl-static:2.0.30.Final")
api("org.apache.maven.wagon:wagon-http:3.4.0")
api("org.junit.jupiter:junit-jupiter:5.6.2")
api("org.reflections:reflections:0.9.11")
api("com.squareup.okhttp3:okhttp:4.2.2")
api("com.squareup.retrofit2:retrofit:2.7.1")
api("io.github.resilience4j:resilience4j-retrofit:1.3.1")
api("com.squareup.okhttp3:okhttp:4.7.1")
api("com.squareup.retrofit2:retrofit:2.8.2")
api("io.github.resilience4j:resilience4j-retrofit:1.4.0")
api("org.antlr:antlr4:4.8")
api("io.swagger.core.v3:swagger-core:2.1.1")
api("io.swagger.core.v3:swagger-core:2.1.2")
api("org.jooq:jooq:3.13.1")
api("com.google.api.grpc:proto-google-common-protos:1.18.0")
api("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.70")
api("org.jetbrains.kotlin:kotlin-allopen:1.3.70")
api("org.springframework.boot:spring-boot-gradle-plugin:2.2.7.RELEASE")
api("org.jlleitschuh.gradle:ktlint-gradle:9.2.1")
api("com.github.ben-manes:gradle-versions-plugin:0.27.0")
api("com.netflix.nebula:nebula-publishing-plugin:17.2.1")
api("com.netflix.nebula:gradle-contacts-plugin:5.1.0")
api("com.netflix.nebula:gradle-info-plugin:7.1.4")
api("org.gradle.kotlin:plugins:1.2.11")
api("com.gradle.publish:plugin-publish-plugin:0.11.0")
api("org.eclipse.jgit:org.eclipse.jgit:5.7.0.202003110725-r")
}
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 2 additions & 0 deletions lib/sisyphus-common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ plugins {
`java-library`
}

description = "Common lib of Sisyphus Project"

dependencies {
compileOnly(Dependencies.Spring.Boot.boot)
}
2 changes: 2 additions & 0 deletions lib/sisyphus-dto/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ plugins {
`java-library`
}

description = "Easy to create struct in Sisyphus"

dependencies {
compileOnly(project(":lib:sisyphus-jackson"))
implementation(project(":lib:sisyphus-common"))
Expand Down
2 changes: 2 additions & 0 deletions lib/sisyphus-grpc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ plugins {
protobuf
}

description = "Sisyphus customized gRPC runtime for Kotlin coroutine"

dependencies {
implementation(project(":lib:sisyphus-jackson"))
api(project(":lib:sisyphus-protobuf"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,3 @@ class CelEngine(global: Map<String, Any?>, val runtime: CelRuntime = CelRuntime(
}
}
}

fun main() {
val engine = CelEngine(mapOf("intValue" to 1L, "test" to 1))
engine
}
Loading

0 comments on commit d7a19dc

Please sign in to comment.