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

Improve Gradle config #2546

Merged
merged 1 commit into from
Oct 4, 2021
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
4 changes: 2 additions & 2 deletions .github/scripts/set-env.sh
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ plugins {
id("org.jetbrains.kotlin.kapt")
}

publishJVM {
isDokkaEnabled = false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌 So by default it sets up dokka, but you disable it it only uses Dokka for the MPP doc jars?

}

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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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