Skip to content

Commit

Permalink
Improve Gradle config
Browse files Browse the repository at this point in the history
- Bump `arrow-gradle-config` plugins to 0.3.2
- Set `group` and `version` in `arrow-libs`
- Disable Dokka in some projects
- Improve publish workflow
  • Loading branch information
JavierSegoviaCordoba committed Oct 4, 2021
1 parent 1dfbd71 commit 0354b33
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/set-env.sh
Expand Up @@ -15,12 +15,12 @@ if [ "$GITHUB_REF" == "refs/heads/main" ]; then
fi

if [ "$LATEST_PUBLISHED_VERSION" == "" ]; then exit 1; fi
RELEASE_VERSION=$(grep projects.latestVersion $BASEDIR/gradle.properties | cut -d= -f2)
RELEASE_VERSION=$(grep "projects.latestVersion" $BASEDIR/gradle.properties | cut -d= -f2)
if [ "$LATEST_PUBLISHED_VERSION" != "$RELEASE_VERSION" ]; then NEW_RELEASE_VERSION_EXISTS=1; fi
else
echo "Into release branch ..."
BRANCH_VERSION=$(echo $GITHUB_REF | cut -d/ -f4)
RELEASE_VERSION=$(grep projects.latestVersion $BASEDIR/gradle.properties | cut -d= -f2)
RELEASE_VERSION=$(grep "projects.latestVersion" $BASEDIR/gradle.properties | cut -d= -f2)
if [ "$BRANCH_VERSION" == "$RELEASE_VERSION" ]; then
NEW_RELEASE_VERSION_EXISTS=1
else
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/publish.yml
Expand Up @@ -30,7 +30,7 @@ env:
jobs:
publish_apple_linux_jvm_js:
runs-on: macos-latest
timeout-minutes: 120
timeout-minutes: 35

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -61,15 +61,15 @@ jobs:
- name: Publish Apple, Linux, JVM & JS targets
working-directory: arrow-libs
run: |
./gradlew publishToSonatype --stacktrace --debug
./gradlew publishToSonatype
echo "$(cat $BASEDIR/gradle.properties | grep projects.version | cut -d'=' -f2) Apple, Linux, JVM & JS deployed!"
- name: Stop Gradle daemons
run: ./gradlew --stop

publish_windows:
runs-on: windows-latest
timeout-minutes: 20
timeout-minutes: 25

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
- name: Publish Windows
working-directory: arrow-libs
run: |
./gradlew publishToSonatype --stacktrace --debug
./gradlew publishToSonatype
echo "$(cat gradle.properties | grep projects.version | cut -d'=' -f2) MingwX64 deployed!"
- name: Stop Gradle daemons
Expand Down Expand Up @@ -137,7 +137,7 @@ jobs:
publish_doc:
env:
JAVA_OPTS: -Xms2g -Xmx4g
GRADLE_OPTS: "-Dorg.gradle.daemon=false -Dorg.gradle.configureondemand=true -XX:MaxPermSize=4096m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -Dorg.gradle.parallel=false"
GRADLE_OPTS: "-Dorg.gradle.daemon=false -Dorg.gradle.configureondemand=true -Dorg.gradle.jvmargs=-Xmx8g -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:+CMSClassUnloadingEnabled -Dfile.encoding=UTF-8 -Dorg.gradle.parallel=false"
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
S3_BUCKET: ${{ secrets.S3_BUCKET }}
Expand Down
5 changes: 0 additions & 5 deletions arrow-libs/ank/build.gradle
Expand Up @@ -20,8 +20,3 @@ plugins {
configure("arrow-ank") {
apply from: "$ROOT_PROJECT"
}

allprojects {
group = property("projects.group").toString()
version = property("projects.version").toString()
}
5 changes: 5 additions & 0 deletions arrow-libs/build.gradle.kts
Expand Up @@ -12,6 +12,11 @@ plugins {
alias(libs.plugins.arrowGradleConfig.nexus)
}

allprojects {
group = property("projects.group").toString()
version = property("projects.version").toString()
}

tasks {
val generateDoc by creating(Exec::class) {
group = "documentation"
Expand Down
4 changes: 4 additions & 0 deletions arrow-libs/core/arrow-core-test/build.gradle.kts
Expand Up @@ -5,6 +5,10 @@ plugins {

apply(from = property("ANIMALSNIFFER_MPP"))

publishMultiplatform {
isDokkaEnabled = false
}

kotlin {
sourceSets {
commonMain {
Expand Down
4 changes: 4 additions & 0 deletions arrow-libs/core/arrow-meta/build.gradle.kts
Expand Up @@ -4,6 +4,10 @@ plugins {
id("org.jetbrains.kotlin.kapt")
}

publishJVM {
isDokkaEnabled = false
}

dependencies {
api(projects.arrowAnnotations)
api(libs.arrow.kotlinMetadata)
Expand Down
4 changes: 4 additions & 0 deletions arrow-libs/fx/arrow-fx-coroutines-test/build.gradle.kts
Expand Up @@ -3,6 +3,10 @@ plugins {
alias(libs.plugins.arrowGradleConfig.publishMultiplatform)
}

publishMultiplatform {
isDokkaEnabled = false
}

apply(from = property("DOC_CREATION"))
apply(from = property("ANIMALSNIFFER_MPP"))

Expand Down
4 changes: 4 additions & 0 deletions arrow-libs/optics/arrow-optics-test/build.gradle.kts
Expand Up @@ -3,6 +3,10 @@ plugins {
alias(libs.plugins.arrowGradleConfig.publishMultiplatform)
}

publishMultiplatform {
isDokkaEnabled = false
}

apply(from = property("ANIMALSNIFFER_MPP"))

kotlin {
Expand Down
2 changes: 1 addition & 1 deletion arrow-site/gradle.properties
Expand Up @@ -3,7 +3,7 @@ POM_NAME=Docs
POM_ARTIFACT_ID=docs
POM_PACKAGING=jar
# Gradle options
org.gradle.jvmargs=-Xmx4g
org.gradle.jvmargs=-Xmx8g
org.gradle.parallel=true
# Kotlin configuration
kotlin.incremental=true
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
@@ -1,6 +1,6 @@
[versions]
animalSniffer = "1.5.0"
arrowGradleConfig = "0.2.1"
arrowGradleConfig = "0.3.2"
autoService = "1.0-rc7"
compileTesting = "0.18"
coroutines = "1.5.2"
Expand Down

0 comments on commit 0354b33

Please sign in to comment.