-
Notifications
You must be signed in to change notification settings - Fork 30
Fix Symlinks and Develocity #361
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# | ||
# Copyright 2023-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. | ||
# | ||
|
||
kotlin.code.style=official | ||
|
||
kotlin.native.ignoreDisabledTargets=true | ||
|
||
kotlin.daemon.jvmargs=-Xmx6g -XX:+HeapDumpOnOutOfMemoryError | ||
kotlin.daemon.useFallbackStrategy=false | ||
|
||
org.gradle.jvmargs=-Xmx6g -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC -XX:MaxMetaspaceSize=768m | ||
org.gradle.daemon=true | ||
org.gradle.parallel=true | ||
org.gradle.workers.max=8 | ||
org.gradle.caching=true | ||
org.gradle.configuration-cache=true | ||
|
||
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled | ||
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true | ||
|
||
# development mode for kotlinx.rpc gradle plugin. Uses local project paths to apply the compiler plugin | ||
kotlinx.rpc.plugin.internalDevelopment=true | ||
|
||
# uncomment to debug compilation process | ||
#kotlin.compiler.execution.strategy=in-process | ||
|
||
# Uncomment to skip attempts to publish Develocity build scans | ||
# Add this property to ~/.gradle/gradle.properties to avoid polluting git with unwanted changes | ||
#kotlinx.rpc.develocity.skipBuildScans=true | ||
|
||
# Uncomment to skip adding git tags to Develocity build scan | ||
# Add this property to ~/.gradle/gradle.properties to avoid polluting git with unwanted changes | ||
#kotlinx.rpc.develocity.skipGitTags=true | ||
|
||
# Uncomment to sync IDEA when working with Kotlin master builds | ||
#kotlinx.rpc.kotlinMasterBuild=true | ||
|
||
# set to true when building IDE compiler plugin artifacts | ||
kotlinx.rpc.forIdeBuild=false |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# | ||
# Copyright 2023-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. | ||
# | ||
|
||
kotlin.code.style=official | ||
|
||
kotlin.native.ignoreDisabledTargets=true | ||
|
||
kotlin.daemon.jvmargs=-Xmx6g -XX:+HeapDumpOnOutOfMemoryError | ||
kotlin.daemon.useFallbackStrategy=false | ||
|
||
org.gradle.jvmargs=-Xmx6g -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC -XX:MaxMetaspaceSize=768m | ||
org.gradle.daemon=true | ||
org.gradle.parallel=true | ||
org.gradle.workers.max=8 | ||
org.gradle.caching=true | ||
org.gradle.configuration-cache=true | ||
|
||
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled | ||
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true | ||
|
||
# development mode for kotlinx.rpc gradle plugin. Uses local project paths to apply the compiler plugin | ||
kotlinx.rpc.plugin.internalDevelopment=true | ||
|
||
# uncomment to debug compilation process | ||
#kotlin.compiler.execution.strategy=in-process | ||
|
||
# Uncomment to skip attempts to publish Develocity build scans | ||
# Add this property to ~/.gradle/gradle.properties to avoid polluting git with unwanted changes | ||
#kotlinx.rpc.develocity.skipBuildScans=true | ||
|
||
# Uncomment to skip adding git tags to Develocity build scan | ||
# Add this property to ~/.gradle/gradle.properties to avoid polluting git with unwanted changes | ||
#kotlinx.rpc.develocity.skipGitTags=true | ||
|
||
# Uncomment to sync IDEA when working with Kotlin master builds | ||
#kotlinx.rpc.kotlinMasterBuild=true | ||
|
||
# set to true when building IDE compiler plugin artifacts | ||
kotlinx.rpc.forIdeBuild=false |
This file contains hidden or 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 hidden or 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
66 changes: 66 additions & 0 deletions
66
gradle-conventions-settings/develocity/src/main/kotlin/loadAgreement.kt
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/* | ||
* Copyright 2023-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. | ||
*/ | ||
|
||
import org.gradle.api.GradleException | ||
import org.gradle.api.initialization.Settings | ||
import org.gradle.kotlin.dsl.extra | ||
import java.nio.file.Path | ||
import java.nio.file.StandardOpenOption | ||
import kotlin.io.path.bufferedWriter | ||
import kotlin.io.path.createFile | ||
import kotlin.io.path.exists | ||
|
||
private const val TERMS_OF_USE_PROPERTY = "kotlinx.rpc.develocity.termsOfUseAgree" | ||
|
||
fun Settings.loadAgreement(): String { | ||
if (isCIRun) { | ||
return "yes" | ||
} | ||
|
||
val localProperties = extra["localProperties"] as? java.util.Properties | ||
?: throw GradleException("'local.properties' property not found") | ||
|
||
when (val value = localProperties.getProperty(TERMS_OF_USE_PROPERTY)) { | ||
"yes", "no" -> { | ||
return value | ||
} | ||
|
||
"" -> { | ||
throw GradleException( | ||
"'$TERMS_OF_USE_PROPERTY' property is not set in file://local.properties'. " + | ||
"Please set this property to 'yes' or 'no'." | ||
) | ||
} | ||
|
||
null -> { | ||
val globalRootDir = extra["globalRootDir"] as? String | ||
?: throw GradleException("'globalRootDir' property not found. Contact developers.") | ||
|
||
val propFile = Path.of(globalRootDir).resolve("local.properties") | ||
if (!propFile.exists()) { | ||
propFile.createFile() | ||
} | ||
|
||
propFile.bufferedWriter(Charsets.UTF_8, bufferSize = 1024, StandardOpenOption.APPEND).use { writer -> | ||
writer.appendLine() | ||
writer.appendLine("# Terms of Gradle use agreement: https://gradle.com/terms-of-service") | ||
writer.appendLine("# Set to yes or no") | ||
writer.appendLine("# Only needed for JetBrains maintainers") | ||
writer.appendLine("$TERMS_OF_USE_PROPERTY=") | ||
} | ||
|
||
throw GradleException( | ||
"'$TERMS_OF_USE_PROPERTY' property not found in file://local.properties . " + | ||
"Please add this property and set it to 'yes' or 'no'." | ||
) | ||
} | ||
|
||
else -> { | ||
throw GradleException( | ||
"Invalid value for '$TERMS_OF_USE_PROPERTY' property: $value. " + | ||
"Please set this property to 'yes' or 'no'." | ||
) | ||
} | ||
} | ||
} |
This file contains hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.