Skip to content

Commit ec561a2

Browse files
committed
Revert "Chore(infra): Prepare atomicfu for including to the Kotlin Aggregate build //KTI-1016 (#265)"
This reverts commit a1aba90
1 parent a26be29 commit ec561a2

File tree

7 files changed

+24
-94
lines changed

7 files changed

+24
-94
lines changed

atomicfu-gradle-plugin/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ if (rootProject.ext.jvm_ir_enabled) {
1414
// Gradle plugin must be compiled targeting the same Kotlin version as used by Gradle
1515
kotlin.sourceSets.all {
1616
languageSettings {
17-
apiVersion = KotlinAggregateBuild.getOverriddenKotlinApiVersion(project) ?: "1.7"
18-
languageVersion = KotlinAggregateBuild.getOverriddenKotlinLanguageVersion(project) ?: "1.7"
17+
apiVersion = "1.7"
18+
languageVersion = "1.7"
1919
}
2020
}
2121

atomicfu-maven-plugin/build.gradle

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ def buildSnapshots = rootProject.properties['build_snapshot_train'] != null
2323

2424
evaluationDependsOn(':atomicfu-transformer')
2525

26-
def kotlinDevRepoUrl = KotlinAggregateBuild.getKotlinDevRepositoryUrl(project)
27-
2826
task generatePomFile(dependsOn: [compileKotlin, ':atomicfu-transformer:publishToMavenLocal']) {
2927
def buildDir = project.buildDir // because Maven model also has "project"
3028
outputs.file(pomFile)
@@ -45,12 +43,11 @@ task generatePomFile(dependsOn: [compileKotlin, ':atomicfu-transformer:publishTo
4543
appendNode('project.build.sourceEncoding', 'UTF-8')
4644
}
4745
appendNode('repositories').with {
48-
if (kotlinDevRepoUrl != null && !kotlinDevRepoUrl.isEmpty()) {
49-
appendNode('repository').with {
50-
appendNode('id', 'dev')
51-
appendNode('url', kotlinDevRepoUrl)
52-
}
46+
appendNode('repository').with {
47+
appendNode('id', 'dev')
48+
appendNode('url', 'https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev')
5349
}
50+
5451
if (buildSnapshots) {
5552
appendNode('repository').with {
5653
appendNode('id', 'kotlin-snapshots')
@@ -80,11 +77,11 @@ task generatePluginDescriptor(type: Exec, dependsOn: generatePomFile) {
8077
if (mavenUserHome != null) args.add("-Dmaven.user.home=${new File(mavenUserHome).getAbsolutePath()}")
8178
if (mavenRepoLocal != null) args.add("-Dmaven.repo.local=${new File(mavenRepoLocal).getAbsolutePath()}")
8279
args.addAll([
83-
'--settings', './settings.xml',
84-
'--errors',
85-
'--batch-mode',
86-
'--file', pomFile.toString(),
87-
'org.apache.maven.plugins:maven-plugin-plugin:3.5.1:descriptor'
80+
'--settings', './settings.xml',
81+
'--errors',
82+
'--batch-mode',
83+
'--file', pomFile.toString(),
84+
'org.apache.maven.plugins:maven-plugin-plugin:3.5.1:descriptor'
8885
])
8986
commandLine args
9087
doLast {

build.gradle

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
import org.jetbrains.kotlin.konan.target.HostManager
66

77
buildscript {
8-
9-
108
/*
119
* These property group is used to build kotlinx.atomicfu against Kotlin compiler snapshot.
1210
* How does it work:
@@ -31,13 +29,14 @@ buildscript {
3129
ext.jvm_ir_enabled = rootProject.properties['enable_jvm_ir'] != null
3230
ext.native_targets_enabled = rootProject.properties['disable_native_targets'] == null
3331

34-
3532
repositories {
3633
mavenCentral()
3734
maven { url "https://plugins.gradle.org/m2/" }
38-
KotlinAggregateBuild.addDevRepositoryIfEnabled(delegate, project)
35+
// Future replacement for kotlin-dev, with cache redirector
36+
maven { url "https://cache-redirector.jetbrains.com/maven.pkg.jetbrains.space/kotlin/p/kotlin/dev" }
37+
maven { url "https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev" }
3938
}
40-
39+
4140
dependencies {
4241
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
4342
classpath "com.moowork.gradle:gradle-node-plugin:$gradle_node_version"
@@ -55,11 +54,12 @@ allprojects {
5554
}
5655
}
5756

58-
logger.info("Using Kotlin compiler $kotlin_version for $it")
59-
57+
println "Using Kotlin $kotlin_version for project $it"
6058
repositories {
6159
mavenCentral()
62-
KotlinAggregateBuild.addDevRepositoryIfEnabled(delegate, project)
60+
// Future replacement for kotlin-dev, with cache redirector
61+
maven { url "https://cache-redirector.jetbrains.com/maven.pkg.jetbrains.space/kotlin/p/kotlin/dev" }
62+
maven { url "https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev" }
6363
}
6464

6565
def deployVersion = properties['DeployVersion']
@@ -79,7 +79,7 @@ allprojects {
7979
}
8080
}
8181

82-
logger.info("Using Kotlin compiler version: $org.jetbrains.kotlin.config.KotlinCompilerVersion.VERSION")
82+
println("Using Kotlin compiler version: $org.jetbrains.kotlin.config.KotlinCompilerVersion.VERSION")
8383
if (build_snapshot_train) {
8484
afterEvaluate {
8585
println "Manifest of kotlin-compiler-embeddable.jar for atomicfu"

buildSrc/src/main/kotlin/KotlinAggregateBuild.kt

Lines changed: 0 additions & 67 deletions
This file was deleted.

buildSrc/src/main/kotlin/Publishing.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,12 @@ fun MavenPom.configureMavenCentralMetadata(project: Project) {
4545
}
4646

4747
fun mavenRepositoryUri(): URI {
48+
// TODO -SNAPSHOT detection can be made here as well
4849
val repositoryId: String? = System.getenv("libs.repository.id")
4950
return if (repositoryId == null) {
5051
// Using implicitly created staging, for MPP it's likely to be a mistake because
5152
// publication on TeamCity will create 3 independent staging repositories
53+
System.err.println("Warning: using an implicitly created staging for atomicfu")
5254
URI("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
5355
} else {
5456
URI("https://oss.sonatype.org/service/local/staging/deployByRepositoryId/$repositoryId")

gradle.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ version=0.18.5-SNAPSHOT
66
group=org.jetbrains.kotlinx
77

88
kotlin_version=1.7.20
9-
109
asm_version=9.3
1110
slf4j_version=1.8.0-alpha2
1211
junit_version=4.12

gradle/compile-options.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/*
32
* Copyright 2017-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
43
*/
@@ -19,8 +18,8 @@ ext.configureKotlin = { isMultiplatform ->
1918

2019
kotlin.sourceSets.all {
2120
languageSettings {
22-
apiVersion = KotlinAggregateBuild.getOverriddenKotlinApiVersion(project) ?: "1.7"
23-
languageVersion = KotlinAggregateBuild.getOverriddenKotlinLanguageVersion(project) ?: "1.7"
21+
apiVersion = "1.7"
22+
languageVersion = "1.7"
2423
}
2524
}
2625
}

0 commit comments

Comments
 (0)