Skip to content

Commit

Permalink
Merge pull request #25 from husnjak/update-proto
Browse files Browse the repository at this point in the history
Update proto
  • Loading branch information
lephyrius authored Nov 9, 2023
2 parents c8ee0d1 + 1a0ce8c commit 48832c8
Show file tree
Hide file tree
Showing 213 changed files with 323 additions and 108,075 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Setup JDK 11
- uses: actions/checkout@v4
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: 'adopt'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2.4.2
uses: gradle/gradle-build-action@v2.9.0
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ jobs:
runs-on: ubuntu-latest
environment: apitesting
steps:
- uses: actions/checkout@v3
- name: Setup JDK 11
- uses: actions/checkout@v4
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: 17
distribution: 'adopt'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2.4.2
uses: gradle/gradle-build-action@v2.9.0
- name: Execute Gradle build
run: ./gradlew build --no-daemon -x publish -x sign
env:
Expand Down
37 changes: 19 additions & 18 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,22 @@ import com.google.protobuf.gradle.GenerateProtoTask
import de.undercouch.gradle.tasks.download.Download

plugins {
kotlin("jvm") version "1.8.21"
id("org.jetbrains.dokka") version "1.8.10"
kotlin("jvm") version "1.9.20"
id("org.jetbrains.dokka") version "1.9.10"
id("maven-publish")
id("signing")
id("de.undercouch.download") version "5.4.0"
id("com.google.protobuf") version "0.8.19"
id("de.undercouch.download") version "5.5.0"
id("com.google.protobuf") version "0.9.4"
}

group = "io.github.husnjak"
version = findProperty("version") as String

val fuelVersion = "2.3.1"
val protobufJavaVersion = "3.23.1"
val junitJupiterVersion = "5.9.3"
val junitPlatformVersion = "1.9.3"
val protobufJavaVersion = "3.24.3"
val junitJupiterVersion = "5.10.0"
val junitPlatformVersion = "1.10.0"
val protobufPluginVersion = "0.9.4"

repositories {
mavenCentral()
Expand All @@ -33,6 +34,7 @@ dependencies {
// Protocol Buffers
// set to api() to add protobuf to client classpath
api("com.google.protobuf:protobuf-java:$protobufJavaVersion")
implementation("com.google.protobuf:protobuf-gradle-plugin:$protobufPluginVersion")
// Tests
testImplementation("org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junitJupiterVersion")
Expand All @@ -53,35 +55,34 @@ sourceSets {

tasks {
compileKotlin {
kotlinOptions.jvmTarget = JavaVersion.VERSION_11.toString()
kotlinOptions.jvmTarget = JavaVersion.VERSION_17.toString()
}
compileTestKotlin {
kotlinOptions.jvmTarget = JavaVersion.VERSION_11.toString()
kotlinOptions.jvmTarget = JavaVersion.VERSION_17.toString()
}
dokkaJavadoc {
outputDirectory.set(buildDir.resolve("javadoc"))
dependsOn(getTasksByName("generateProto", true))
}
withType<GenerateProtoTask> {
dependsOn(downloadProtoFiles)
dependsOn("downloadProtoFiles")
}
processResources{
dependsOn(getTasksByName("generateProto", true))
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
}

protobuf.protobuf.run {
protoc(delegateClosureOf<ExecutableLocator> {
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:$protobufJavaVersion"
})
generatedFilesBaseDir = "$projectDir/src"
}
}

val downloadProtoFiles by tasks.creating(Download::class) {
src("https://api.igdb.com/v4/igdbapi.proto")
dest("$projectDir/src/resources/com/api/igdb/igdbproto.proto")
overwrite(true)
tasks.register("downloadProtoFiles",Download::class) {
this.src("https://api.igdb.com/v4/igdbapi.proto")
this.dest("$projectDir/src/resources/com/api/igdb/igdbproto.proto")
this.overwrite(true)
}

val dokkaJar by tasks.creating(Jar::class) {
Expand Down
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-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion jitpack.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
jdk:
- openjdk11
- openjdk17
Loading

0 comments on commit 48832c8

Please sign in to comment.