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

move to sonatype maven central #147

Merged
Merged
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
10 changes: 4 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
java-version: ${{ matrix.java-version }}

- name: Run Build
run: ./gradlew clean ktlintCheck build jar docsJar sourcesJar testsJar reportsZip generatePomFileForMavenPublication -s --scan
run: ./gradlew clean ktlintCheck build jar docsJar sourcesJar testsJar reportsZip publishMavenPublicationToMavenLocal -s

- name: Upload Artifacts
uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -74,9 +74,7 @@ jobs:
java-version: 1.8

- name: Publish
run: ./gradlew clean artifactoryPublish -s --scan
run: ./gradlew clean publishMavenPublicationToMavenRepository -s
env:
BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }}
BINTRAY_USERNAME: ${{ secrets.BINTRAY_USERNAME }}
GRADLE_KEY: ${{ secrets.GRADLE_KEY }}
GRADLE_SECRET: ${{ secrets.GRADLE_SECRET }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Also, for Android projects the license HTML file will be copied to `<project>/sr
```groovy
buildscript {
repositories {
jcenter()
mavenCentral()
google()
}

Expand All @@ -30,13 +30,13 @@ buildscript {
apply plugin: 'com.android.application' // or 'java-library'
apply plugin: 'com.jaredsburrows.license'
```
Release versions are available in the [JFrog Bintray repository](https://jcenter.bintray.com/com/jaredsburrows/gradle-license-plugin/).
Release versions are available in the [Sonatype's release repository](https://repo1.maven.org/maven2/com/jaredsburrows/gradle-license-plugin/).

**Snapshot:**
```groovy
buildscript {
repositories {
maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local/' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
google()
}

Expand All @@ -48,7 +48,7 @@ buildscript {
apply plugin: 'com.android.application' // or 'java-library'
apply plugin: 'com.jaredsburrows.license'
```
Snapshot versions are available in the [JFrog Artifactory repository](https://oss.jfrog.org/artifactory/libs-snapshot/com/jaredsburrows/gradle-license-plugin/).
Snapshot versions are available in the [Sonatype's snapshots repository](https://oss.sonatype.org/content/repositories/snapshots/com/jaredsburrows/gradle-license-plugin/).

## Tasks

Expand Down Expand Up @@ -89,27 +89,27 @@ Design,null,26.1.0,null,null,null,The Apache Software License,http://www.apache.
<dt>Copyright &copy; 20xx The original author or authors</dt>
</dl>
</li>
<a name="0"></a>
<pre>No license found</pre>
<br>
<a name="0"></a>
<pre>No license found</pre>
<br>
<hr>
<li><a href="#1783810846">Android GIF Drawable Library (1.2.3)</a>
<dl>
<dt>Copyright &copy; 20xx Karol Wrótniak</dt>
</dl>
</li>
<a name="1783810846"></a>
<pre>mit.txt here</pre>
<br>
<a name="1783810846"></a>
<pre>mit.txt here</pre>
<br>
<hr>
<li><a href="#1934118923">Design (26.1.0)</a>
<dl>
<dt>Copyright &copy; 20xx The original author or authors</dt>
</dl>
</li>
<a name="1934118923"></a>
<pre>apache-2.0.txt here</pre>
<br>
<a name="1934118923"></a>
<pre>apache-2.0.txt here</pre>
<br>
<hr>
</ul>
</body>
Expand Down
57 changes: 46 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
plugins {
id 'com.jfrog.artifactory' version '4.24.16'
id 'com.jfrog.bintray' version '1.8.5'
id 'com.github.ben-manes.versions' version '0.39.0'
id 'com.gradle.plugin-publish' version '0.15.0'
id 'org.jetbrains.kotlin.jvm' version '1.5.30'
id 'org.jetbrains.dokka' version '0.10.1'
id 'org.jetbrains.dokka' version '1.5.0'
id 'com.gradle.plugin-publish' version '0.15.0'
id 'org.jlleitschuh.gradle.ktlint' version '10.2.0'
id 'java-gradle-plugin'
id 'com.github.ben-manes.versions' version '0.39.0'
id 'groovy'
id 'java-gradle-plugin'
id 'maven-publish'
id 'signing'
}

repositories {
jcenter()
mavenCentral()
google()
}

Expand Down Expand Up @@ -50,7 +49,7 @@ task createClasspathManifest() {
}
}

configurations.all {
configurations.configureEach {
resolutionStrategy {
eachDependency { details ->
if (details.requested.group == 'org.jetbrains.kotlin') {
Expand All @@ -61,7 +60,6 @@ configurations.all {
}

dependencies {
implementation localGroovy()
implementation deps.kotlin.stdlib.jdk
implementation deps.kotlinx.html
implementation deps.gson
Expand All @@ -75,11 +73,48 @@ dependencies {
testImplementation deps.commons.csv
}

apply from: 'gradle/compile.gradle'
apply from: 'gradle/publish.gradle'

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
jvmTarget = rootProject.versions.java
}
}

tasks.withType(JavaCompile).configureEach {
sourceCompatibility = rootProject.versions.java
targetCompatibility = rootProject.versions.java

// Show all warnings except boot classpath
configure(options) {
compilerArgs << '-Xlint:all' // Turn on all warnings
compilerArgs << '-Werror' // Turn warnings into errors
encoding = 'utf-8'
}
}

tasks.withType(GroovyCompile).configureEach {
sourceCompatibility = rootProject.versions.java
targetCompatibility = rootProject.versions.java

// Show all warnings except boot classpath
configure(options) {
compilerArgs << '-Xlint:all' // Turn on all warnings
compilerArgs << '-Werror' // Turn warnings into errors
encoding = 'utf-8'
}
}

tasks.withType(Test).configureEach {
useJUnitPlatform()

// Turn on logging for all tests, filter to show failures/skips only
testLogging {
exceptionFormat 'full'
showCauses true
showExceptions true
showStackTraces true
events 'failed', 'skipped'
}
}

4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
GROUP=com.jaredsburrows
POM_ARTIFACT_ID=gradle-license-plugin
VERSION_NAME=0.8.91-SNAPSHOT

POM_NAME=Gradle License Plugin
POM_ARTIFACT_ID=gradle-license-plugin
POM_DESCRIPTION=Gradle plugin that provides a task to generate a HTML license report of your project.
POM_INCEPTION_YEAR=2016
POM_PACKAGING=jar
POM_URL=https://github.com/jaredsburrows/gradle-license-plugin

Expand All @@ -22,6 +23,5 @@ POM_DEVELOPER_ID=jaredsburrows
POM_DEVELOPER_NAME=Jared Burrows
[email protected]

BINTRAY_GITHUB_REPO=jaredsburrows/gradle-license-plugin
PLUGIN_NAME=com.jaredsburrows.license
PLUGIN_NAME_CLASS=com.jaredsburrows.license.LicensePlugin
43 changes: 0 additions & 43 deletions gradle/compile.gradle

This file was deleted.

4 changes: 2 additions & 2 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ext.deps = [
],
],
'kotlinx': [
'html': 'org.jetbrains.kotlinx:kotlinx-html-jvm:0.7.2',
'html': 'org.jetbrains.kotlinx:kotlinx-html-jvm:0.7.3',
],
'gson' : 'com.google.code.gson:gson:2.8.8',
'android': [
Expand All @@ -23,7 +23,7 @@ ext.deps = [
]
]
],
'spock' : 'org.spockframework:spock-core:1.3-groovy-2.5',
'spock' : 'org.spockframework:spock-junit4:2.0-groovy-3.0',
'xmlunit': [
'matchers': 'org.xmlunit:xmlunit-matchers:2.8.2',
],
Expand Down
Loading