Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup publishing #270

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: release

on:
push:
tags:
- '**'

jobs:
release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: ./.github/actions/setup

- run: ./gradlew publish
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ARTIFACT_SIGNING_PRIVATE_KEY }}

- name: Extract release notes
id: release_notes
uses: ffurrer2/extract-release-notes@v1

- name: Create release
uses: softprops/action-gh-release@v1
with:
body: ${{ steps.release_notes.outputs.release_notes }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14 changes: 14 additions & 0 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: snapshot

on:
push:
tags:
- '**'

jobs:
release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: ./.github/actions/setup
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

#### Three lint artifacts!
- Anvil Lint rules!
- `ContributesBindingOverBinds`: Suggests using
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ plugins {
alias(libs.plugins.kover) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.lint) apply false
alias(libs.plugins.publish) apply false
alias(libs.plugins.sortDependencies) apply false
alias(libs.plugins.spotless) apply false
}
Expand Down
17 changes: 16 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,22 @@ org.gradle.caching=true
org.gradle.configureondemand=true
org.gradle.configuration-cache=true
org.gradle.kotlin.dsl.allWarningsAsErrors=true

android.useAndroidX=true
android.defaults.buildfeatures.resvalues=false
android.defaults.buildfeatures.shaders=false
# POM
SONATYPE_HOST=DEFAULT
RELEASE_SIGNING_ENABLED=true
GROUP=dev.whosnickdoglio
VERSION_NAME=0.1.0-SNAPSHOT
POM_INCEPTION_YEAR=2024
POM_URL=https://github.com/WhosNickDoglio/dagger-rules/
POM_SCM_URL=https://github.com/WhosNickDoglio/dagger-rules/
POM_SCM_CONNECTION=scm:git:[email protected]:WhosNickDoglio/dagger-rules.git
POM_SCM_DEV_CONNECTION=scm:[email protected]:WhosNickDoglio/dagger-rules.git
POM_LICENCE_NAME=The MIT License
POM_LICENCE_URL=https://opensource.org/license/mit/
POM_LICENCE_DIST=repo
POM_DEVELOPER_ID=WhosNickDoglio
POM_DEVELOPER_NAME=Nicholas Doglio
POM_DEVELOPER_URL=https://github.com/WhosNickDoglio/
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ dependencyAnalysis = { id = "com.autonomousapps.dependency-analysis", version.re
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" }
publish = { id = "com.vanniktech.maven.publish", version = "0.28.0" }
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
ksp = { id = "com.google.devtools.ksp", version = "2.1.10-1.0.29" }
sortDependencies = { id = "com.squareup.sort-dependencies", version.ref = "sort" }
Expand Down
1 change: 1 addition & 0 deletions lint/anvil/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
alias(libs.plugins.convention.kotlin)
alias(libs.plugins.ksp)
alias(libs.plugins.publish)
}

convention { enableCodeCoverageWithKover() }
Expand Down
12 changes: 12 additions & 0 deletions lint/anvil/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# Copyright (C) 2024 Nicholas Doglio
# SPDX-License-Identifier: MIT
#

POM_ARTIFACT_ID=dagger-rules-lint
POM_NAME=Dagger Rules Lint Checks
POM_DESCRIPTION=Dagger Rules Lint Checks

# Kotlin adds the stdlib dep by default in 1.4.0+, but that's not really allowed in lint jars. This
# disables that behavior for now
kotlin.stdlib.default.dependency=false
1 change: 1 addition & 0 deletions lint/dagger/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
alias(libs.plugins.convention.kotlin)
alias(libs.plugins.ksp)
alias(libs.plugins.publish)
}

convention { enableCodeCoverageWithKover() }
Expand Down
12 changes: 12 additions & 0 deletions lint/dagger/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# Copyright (C) 2024 Nicholas Doglio
# SPDX-License-Identifier: MIT
#

POM_ARTIFACT_ID=dagger-rules-lint
POM_NAME=Dagger Rules Lint Checks
POM_DESCRIPTION=Dagger Rules Lint Checks

# Kotlin adds the stdlib dep by default in 1.4.0+, but that's not really allowed in lint jars. This
# disables that behavior for now
kotlin.stdlib.default.dependency=false
1 change: 1 addition & 0 deletions lint/hilt/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
alias(libs.plugins.convention.kotlin)
alias(libs.plugins.ksp)
alias(libs.plugins.publish)
}

convention { enableCodeCoverageWithKover() }
Expand Down
12 changes: 12 additions & 0 deletions lint/hilt/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# Copyright (C) 2024 Nicholas Doglio
# SPDX-License-Identifier: MIT
#

POM_ARTIFACT_ID=hilt-lint
POM_NAME=Hilt Lint rules
POM_DESCRIPTION=Static Analysis checks for Hilt

# Kotlin adds the stdlib dep by default in 1.4.0+, but that's not really allowed in lint jars. This
# disables that behavior for now
kotlin.stdlib.default.dependency=false
Loading