Skip to content

Commit

Permalink
chore: Modernize build.
Browse files Browse the repository at this point in the history
  • Loading branch information
nstdio committed Mar 25, 2022
1 parent 95771c7 commit ef6162f
Show file tree
Hide file tree
Showing 13 changed files with 426 additions and 340 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
build:
env:
RUN_ANALYZE: ${{ github.event.pull_request.user.login != 'dependabot' }}
RUN_ANALYZE: false
name: Build
runs-on: ubuntu-latest
steps:
Expand Down
263 changes: 0 additions & 263 deletions build.gradle

This file was deleted.

41 changes: 41 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Copyright (C) 2022 Edgar Asatryan
*
* 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
*
* 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.
*/

plugins {
id("net.researchgate.release")

id("io.github.nstdio.http.ext.library-conventions")
id("io.github.nstdio.http.ext.quality-conventions")
id("io.github.nstdio.http.ext.publish-conventions")
}

repositories {
mavenCentral()
}

release {
tagTemplate = "v${version}"
with(propertyMissing("git") as net.researchgate.release.GitAdapter.GitConfig) {
requireBranch = "main"
pushToRemote = "origin"
}
}

tasks.register("updateReadme", io.github.nstdio.http.ext.ReadmeUpdateTask::class)

tasks.named("afterReleaseBuild") {
dependsOn("publishToSonatype", "closeAndReleaseSonatypeStagingRepository", "updateReadme")
}
7 changes: 0 additions & 7 deletions buildSrc/build.gradle

This file was deleted.

38 changes: 38 additions & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Copyright (C) 2022 Edgar Asatryan
*
* 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
*
* 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.
*/

import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
`kotlin-dsl`
}

repositories {
gradlePluginPortal()
}

dependencies {
implementation("de.jjohannes.gradle:extra-java-module-info:0.11")
implementation("org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.3")
implementation("io.github.gradle-nexus:publish-plugin:1.1.0")
implementation("net.researchgate:gradle-release:2.8.1")
}

tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
}
Loading

0 comments on commit ef6162f

Please sign in to comment.