Skip to content

Commit

Permalink
chore: prepare for release
Browse files Browse the repository at this point in the history
  • Loading branch information
Vexcited committed Nov 26, 2024
1 parent 0532a68 commit 8bd183a
Show file tree
Hide file tree
Showing 11 changed files with 119 additions and 85 deletions.
1 change: 0 additions & 1 deletion .github/FUNDING.yml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/assets/banner.svg

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish

on:
push:
tags:
- 'kotlin-v*.*.*'

env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false"

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21

- uses: gradle/actions/setup-gradle@v4

- name: Upload Artifacts
run: ./gradlew publishAndReleaseToMavenCentral --no-configuration-cache
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ARTIFACT_SIGNING_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.ARTIFACT_SIGNING_PASSPHRASE }}
1 change: 1 addition & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ authors:
email: [email protected]
repository-code: 'https://github.com/LiterateInk/Turbawself'
url: 'https://docs.literate.ink/turbawself'
repository-artifact: 'https://central.sonatype.com/artifact/ink.literate/turbawself'
abstract: >-
An awmazing API wrapper for Turboself.
keywords:
Expand Down
17 changes: 8 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# Contributing to Turbawself

You might refer to our [global contribution guidelines](https://github.com/LiterateInk/.github/blob/main/CONTRIBUTING.md) first.

If you want to contribute to the development, please see the section below.
# Contributing

## Development

Please refer to the `CONTRIBUTING.md` of the implementation you want to work on for more information.
To start developing, clone the repository and install the dependencies.

| [JS/TS](https://github.com/LiterateInk/Turbawself/blob/js/CONTRIBUTING.md) | Rust | Python | Swift |
| :---: | :---: | :---: | :---: |
| [Kotlin](https://github.com/LiterateInk/Turbawself/tree/kotlin) | C# | | |
```bash
# Clone the repository.
git clone https://github.com/LiterateInk/Turbawself && cd Turbawself
# Switch to the Kotlin implementation branch.
git checkout kotlin
```
35 changes: 21 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,33 @@
<img alt="Turbawself: An awmazing API wrapper for Turboself" src=".github/assets/banner.svg" width="100%" />
<img alt="Turbawself: An awmazing API wrapper for Turboself" src="https://raw.githubusercontent.com/LiterateInk/Turbawself/index/.github/assets/banner.svg" width="100%" />

*This library **is not** affiliated with [Turboself](https://www.turboself.fr/) in any way.*

## What is "Turboself" ?
## Installation

[Turboself](https://www.turboself.fr/) is an application mainly used in schools to manage school catering. It enables students and parents to reserve and pay for meals, consult menus and track consumption. Turboself facilitates canteen organization and ensures efficient management of school meals.
### Maven

## Implementations
```xml
<dependency>
<groupId>ink.literate</groupId>
<artifactId>turbawself</artifactId>
<version>0.0.0</version>
</dependency>
```

You're currently on the `index` branch.
### Gradle (Kotlin)

Since we're implementing this library in different programming languages, we have a branch for each of them.
```kotlin
implementation("ink.literate:turbawself:0.0.0")
```

| [JS/TS](https://github.com/LiterateInk/Turbawself/tree/js) | Rust | Python | Swift |
|:---------------------------------------------------------------:| :---: | :---: | :---: |
| [Kotlin](https://github.com/LiterateInk/Turbawself/tree/kotlin) | C# | | |
### Gradle

## Acknowledgements
```groovy
implementation 'ink.literate:turbawself:0.0.0'
```

- [`turboself-api`](https://github.com/raphckrman/turboself-api)
- [Tom THERET](https://github.com/tom-theret) for helping in our experiments against Turboself's API
## Documentation

## License
You can find documentation with guides at [docs.literate.ink/turbawself](https://docs.literate.ink/turbawself).

This project is licensed under the GPL-3.0 License - see the [LICENSE.md](LICENSE.md) file for details.
If that's not helpful, you can always [open an issue](https://github.com/LiterateInk/Turbawself/issues) to ask for help or join the [LiterateInk Discord server](https://literate.ink/discord).
1 change: 0 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
plugins {
alias(libs.plugins.androidLibrary) apply false
alias(libs.plugins.kotlinMultiplatform) apply false
alias(libs.plugins.vanniktech.mavenPublish) apply false
}
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ kotlin.mpp.enableCInteropCommonization=true
#Android
android.useAndroidX=true
android.nonTransitiveRClass=true
kotlin.mpp.androidGradlePluginCompatibility.nowarn=true
1 change: 0 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.
[plugins]
androidLibrary = { id = "com.android.library", version.ref = "agp" }
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
vanniktech-mavenPublish = { id = "com.vanniktech.maven.publish", version = "0.29.0" }
70 changes: 57 additions & 13 deletions library/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import com.vanniktech.maven.publish.SonatypeHost

val libraryName = "Turbawself"
version = "0.0.0"

plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.androidLibrary)
alias(libs.plugins.vanniktech.mavenPublish)
id("com.vanniktech.maven.publish") version "0.29.0"
}

val libraryName = "Turbawself"
val idLibraryName = libraryName.lowercase()

val groupName = "ink.literate"
group = groupName

version = "1.0.0"

kotlin {
jvm()
androidTarget {
publishLibraryVariants("release")
@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions { jvmTarget.set(JvmTarget.JVM_1_8) }
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
}
}

sourceSets {
Expand All @@ -35,12 +33,58 @@ kotlin {
implementation(libs.kotlinx.datetime)
}
}
val commonTest by getting { dependencies { implementation(libs.kotlin.test) } }
val commonTest by getting {
dependencies {
implementation(libs.kotlin.test)
}
}
}
}

val groupName = "ink.literate"
val idLibraryName = libraryName.lowercase()
group = groupName

android {
namespace = groupName
compileSdk = libs.versions.android.compileSdk.get().toInt()
defaultConfig { minSdk = libs.versions.android.minSdk.get().toInt() }
}
defaultConfig {
minSdk = libs.versions.android.minSdk.get().toInt()
}
}

mavenPublishing {
coordinates(groupName, idLibraryName, version.toString())

pom {
name = libraryName
description = "An awmazing API wrapper for Turboself."
inceptionYear = "2024"

url = "https://docs.literate.ink/$idLibraryName"

licenses {
license {
name.set("GPL-3.0-or-later")
url.set("https://www.gnu.org/licenses/gpl-3.0.txt")
distribution.set("https://www.gnu.org/licenses/gpl-3.0.txt")
}
}

developers {
developer {
organization = "LiterateInk"
organizationUrl = "https://literate.ink"
}
}

scm {
url = "https://github.com/LiterateInk/$libraryName"
connection = "scm:git:https://github.com/LiterateInk/$libraryName.git"
developerConnection = "scm:git:https://github.com/LiterateInk/$libraryName.git"
}
}

publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, automaticRelease = true)
signAllPublications()
}
1 change: 0 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@ dependencyResolutionManagement {
}

rootProject.name = "turbawself"

include(":library")

0 comments on commit 8bd183a

Please sign in to comment.