Skip to content
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
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased / Snapshot]

## [0.3]

### Added
- Added Bao and Staudt to list of reviewers [#188](https://github.com/ie3-institute/powerflow/issues/188)
- Added semantic Versioning plugin to gradle [#218](https://github.com/ie3-institute/powerflow/issues/218)

## Removed
- Removed dependency constraint [#221](https://github.com/ie3-institute/powerflow/issues/221)

### Changed
### Updates
- Upgraded to `scala3` [#204](https://github.com/ie3-institute/powerflow/issues/204)
- Bumping gradle to 8.14

## [0.2]

Expand All @@ -36,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Removed
- Spock testing framework

[Unreleased / Snapshot]: https://github.com/ie3-institute/powerflow/compare/0.2...HEAD
[Unreleased / Snapshot]: https://github.com/ie3-institute/powerflow/compare/0.3...HEAD
[0.3]: https://github.com/ie3-institute/powerflow/compare/0.2...0.3
[0.2]: https://github.com/ie3-institute/powerflow/compare/0.1...0.2
[0.1]: https://github.com/ie3-institute/powerflow/releases/tag/0.1
52 changes: 27 additions & 25 deletions gradle/scripts/mavenCentralPublish.gradle
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
/* Maven publish - start */
task sourcesJar(type: Jar) {

tasks.register("sourcesJar", Jar) {
archiveClassifier.set("sources")
from sourceSets.main.allSource
from sourceSets.main.allJava
}

task javadocJar(type: Jar, dependsOn: javadoc) {
tasks.register("javadocJar", Jar) {
dependsOn tasks.named("javadoc", Javadoc)
archiveClassifier.set("javadoc")
from javadoc.destinationDir
from { tasks.named("javadoc", Javadoc).get().destinationDir }
}

if (project.hasProperty('user') && project.hasProperty('password') && project.hasProperty('deployVersion')) {

if (project.hasProperty('user') && project.hasProperty('password')) {
// snapshot version differs from normal version
String versionString = project.getProperty('deployVersion')

signing {
required { !version.endsWith('SNAPSHOT') }
if (required)
sign(publishing.publications)
}

publishing {
publications {
mavenJava(MavenPublication) {
create("mavenJava", MavenPublication) {

versionMapping {
// resolves dynamic versioning to current version number
Expand All @@ -37,7 +36,7 @@ if (project.hasProperty('user') && project.hasProperty('password')) {
url = 'https:github.com/ie3-institute/powerflow'
organization {
name = 'Institute of Energy Systems, Energy Efficiency and Energy Economics (ie3)/TU Dortmund University'
url = 'http:www.ie3.tu-dortmund.de/'
url = 'https:www.ie3.tu-dortmund.de/'
}
issueManagement {
system = 'GitHub'
Expand All @@ -63,38 +62,41 @@ if (project.hasProperty('user') && project.hasProperty('password')) {
}

removeTestDependenciesFromPom(pom)
groupId project.getProperty('group')
artifactId 'powerflow'
version project.getProperty('version')
groupId = group
artifactId = 'powerflow'
version = versionString

from components.java
artifact sourcesJar
artifact javadocJar
artifact tasks.named("sourcesJar")
artifact tasks.named("javadocJar")
}
}
repositories {
maven {
def releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = this.version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
url = versionString.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username project.getProperty('user')
password project.getProperty('password')
}
}
}
signing {
useInMemoryPgpKeys(
findProperty('signingKey') as String,
findProperty('signingPassword') as String
)
sign publications.mavenJava
}
}


model {
tasks.generatePomFileForMavenJavaPublication {
destination = file("${layout.buildDirectory.dir}/generated-pom.xml")
}
tasks.named("generatePomFileForMavenJavaPublication") {
destination = layout.buildDirectory.file("generated-pom.xml").get().asFile
}
}

def removeTestDependenciesFromPom(pom) {

pom.withXml {
def root = asNode()
// eliminate test-scoped dependencies (no need in maven central POMs)
Expand All @@ -104,4 +106,4 @@ def removeTestDependenciesFromPom(pom) {
}
}

/* Maven publish - end */
/* Maven publish - end */
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
7 changes: 5 additions & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
2 changes: 2 additions & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down
7 changes: 4 additions & 3 deletions version.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#Generated by the Semver Plugin for Gradle
#Fri May 09 11:13:49 CEST 2025
version.buildmeta=
version.major=1
version.minor=0
version.major=0
version.minor=3
version.patch=0
version.prerelease=
version.semver=1.0.0
version.semver=0.3.0