-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from theam/fix/maven-central-publish-and-build…
…-scripts Fixed: Build and publish scripts
- Loading branch information
Showing
7 changed files
with
51 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,20 +3,34 @@ plugins { | |
id "io.freefair.lombok" version "8.3" | ||
id 'maven-publish' | ||
id 'signing' | ||
id 'io.github.gradle-nexus.publish-plugin' version '1.3.0' | ||
} | ||
|
||
def rootGroup = "com.theagilemonkeys.ellmental" | ||
def rootVersion = properties['version'] | ||
def rootSourceCompatibility = properties['sourceCompatibility'] | ||
def rootSourceCompatibility = JavaVersion.VERSION_17 | ||
def publishablePackages = [ | ||
"core": "Core library for eLLMental", | ||
"embeddingsgeneration": "Embeddings generation module for eLLMental", | ||
"embeddingsstore": "Embeddings store module for eLLMental", | ||
"embeddingsspace": "Embeddings space module for eLLMental", | ||
"textgeneration": "Text generation module for eLLMental", | ||
] | ||
|
||
allprojects { | ||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
tasks.withType(JavaCompile) { | ||
sourceCompatibility = rootSourceCompatibility | ||
targetCompatibility = rootSourceCompatibility | ||
} | ||
} | ||
|
||
java { | ||
sourceCompatibility = rootSourceCompatibility | ||
targetCompatibility = rootSourceCompatibility | ||
} | ||
|
||
dependencies { | ||
|
@@ -27,6 +41,7 @@ dependencies { | |
subprojects { subproject -> | ||
group = rootGroup | ||
version = rootVersion | ||
description = publishablePackages[subproject.name] | ||
|
||
apply plugin: 'java' | ||
apply plugin: 'io.freefair.lombok' | ||
|
@@ -48,7 +63,7 @@ subprojects { subproject -> | |
useJUnitPlatform() | ||
} | ||
|
||
if (!subproject.name.startsWith('examples:')) { | ||
if (publishablePackages.containsKey(subproject.name)) { | ||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
|
@@ -62,7 +77,25 @@ subprojects { subproject -> | |
pom { | ||
name = subproject.name | ||
description = subproject.description | ||
// ... other POM properties | ||
url = 'https://github.com/theam/ellmental' | ||
licenses { | ||
license { | ||
name = 'The Apache License, Version 2.0' | ||
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'theam' | ||
name = 'The Agile Monkeys' | ||
email = '[email protected]' | ||
} | ||
} | ||
scm { | ||
connection = 'scm:git:git://github.com/theam/ellmental.git' | ||
developerConnection = 'scm:git:ssh://github.com:theam/ellmental.git' | ||
url = 'https://github.com/theam/ellmental' | ||
} | ||
} | ||
} | ||
} | ||
|
@@ -97,3 +130,16 @@ subprojects { subproject -> | |
tasks.test { | ||
useJUnitPlatform() | ||
} | ||
|
||
nexusPublishing { | ||
packageGroup = rootGroup | ||
repositories { | ||
sonatype { | ||
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/")) | ||
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")) | ||
|
||
username = System.getenv("MAVEN_USERNAME") | ||
password = System.getenv("MAVEN_PASSWORD") | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters