Skip to content

Commit

Permalink
[build] publish lib in github maven repo
Browse files Browse the repository at this point in the history
  • Loading branch information
anydef committed Nov 27, 2023
1 parent d653ca8 commit cec03f6
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 138 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ jobs:
- name: jar
run: ./gradlew :library:clean :library:assemble :library:testClasses :library:jar

- name: test report
uses: dorny/test-reporter@v1
if: always() # run this step even if previous step failed
with:
name: test report # Name of the check run which will be created
path: build/test-results/**/TEST-*.xml # Path to test results
reporter: java-junit

# - name: test report
# uses: dorny/test-reporter@v1
# if: always() # run this step even if previous step failed
# with:
# name: test report # Name of the check run which will be created
# path: build/test-results/**/TEST-*.xml # Path to test results
# reporter: java-junit
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ dependencies {

test {
useJUnitPlatform()

}

tasks.register('testReport', TestReport) {
Expand Down
12 changes: 7 additions & 5 deletions gradle/repositoriesGitHub.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ allprojects {
name "GitHub"
url "https://maven.pkg.github.com/otto-de/querqy-unplugged"
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("FKT_USER")
password = project.findProperty("gpr.key") ?: System.getenv("FKT_KEY")
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_ACTOR")
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
}
}
flatDir {
Expand All @@ -37,15 +37,17 @@ publishing {
repositories {
maven {
name "Github"
url "https://maven.pkg.github.com/otto-ec/nucleus_libs"
url "https://maven.pkg.github.com/otto-de/querqy-unplugged"
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("FKT_USER")
password = project.findProperty("gpr.key") ?: System.getenv("FKT_KEY")
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_ACTOR")
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
}
}
}

publications {
gpr(MavenPublication) {
artifactId project.name
from(components.java)
}
}
Expand Down
62 changes: 0 additions & 62 deletions integration-solr/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,68 +45,6 @@ java {
sourceCompatibility = 11
}

publishing {
publications {
mavenJava(MavenPublication) {
groupId = 'org.querqy'
artifactId = 'querqy-unplugged-solr'
version = "$version"

from components.java

versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = 'Querqy Unplugged Solr'
description = 'A lightweight Solr plugin that allows the usage of some lucene queries via Solr JSON DSL'
url = 'https://querqy.org'

licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'jope'
name = 'Johannes Peter'
email = '[email protected]'
}
}
scm {
url = '[email protected]:querqy/querqy-unplugged.git'
connection = 'scm:git:[email protected]:querqy/querqy-unplugged.git'
developerConnection = 'scm:git:[email protected]:querqy/querqy-unplugged.git'
}
}
}
}
repositories {
maven {
def releasesRepoUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2'
def snapshotsRepoUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'

name = 'sonatype'
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials(PasswordCredentials)
}
}
}

signing {
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mavenJava
}


javadoc {
if(JavaVersion.current().isJava9Compatible()) {
Expand Down
64 changes: 1 addition & 63 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repositories {

allprojects {
group = 'org.querqy'
version = '1.0.1-SNAPSHOT'
version = '1.0.1'
}


Expand Down Expand Up @@ -49,74 +49,12 @@ java {
sourceCompatibility = 11
}

publishing {
publications {
mavenJava(MavenPublication) {
groupId = 'org.querqy'
artifactId = 'querqy-unplugged'
version = "$version"

from components.java

versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = 'Querqy Unplugged'
description = 'A library to handle query rewriting outside of a search engine'
url = 'https://querqy.org'

licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'jope'
name = 'Johannes Peter'
email = '[email protected]'
}
}
scm {
url = '[email protected]:querqy/querqy-unplugged.git'
connection = 'scm:git:[email protected]:querqy/querqy-unplugged.git'
developerConnection = 'scm:git:[email protected]:querqy/querqy-unplugged.git'
}
}
}
}
repositories {
maven {
def releasesRepoUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2'
def snapshotsRepoUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'

name = 'sonatype'
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials(PasswordCredentials)
}
}
}

jar {
archiveBaseName = "${rootProject.name}"
archiveVersion = "${project.version}"
}

/*
signing {
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mavenJava
}
*/

javadoc {
if(JavaVersion.current().isJava9Compatible()) {
Expand Down

0 comments on commit cec03f6

Please sign in to comment.