Commit Graph

50 Commits

Author SHA1 Message Date
Denis.Zharkov 7c3383bb39 Fix warnings after KT-48899
All API ToolingModelBuilder is marked as NonNullApi
https://github.com/gradle/gradle/commit/f93bf949486e73655810ab49ad316100b1c2804c#diff-76e89b92025ccef4e2763c5ee8d30bde939c4a9db26bfc913eac88069cbf5d36
2021-09-30 14:36:27 +03:00
Yahor Berdnikau 60cbfbf107 Change KotlinGradleSubplugin deprecation level to ERROR.
^KT-48830 Fixed
2021-09-29 12:13:02 +00:00
Vyacheslav Gerasimov f91d6958a8 Build: Rework runtimeJar helper and drop redundant configuration
#KTI-559
2021-09-26 20:10:29 +03:00
Yahor Berdnikau 7fff282565 Fix AllOpen plugin exposes common with Gradle runtime dependencies.
^KT-47354 Fixed
2021-07-07 11:31:18 +00:00
Yahor Berdnikau 7789054547 Migrate repo to use JVM toolchains Gradle feature.
^KT-46972 Fixed
2021-07-05 14:11:12 +00:00
Vyacheslav Gerasimov 58f1fb644f Build: Stop publishing jars with original classifier
#KTI-580
2021-06-17 19:43:10 +03:00
Vyacheslav Gerasimov a0469a1d62 Build: Make Gradle plugin publications reuse POMs from the main one
#KTI-571
2021-06-17 19:43:07 +03:00
Alexander Udalov 1d6b198915 Build: suppress version and JVM target warnings
To further reduce the output on each build.
2021-02-18 12:17:17 +01:00
Alexander Udalov 2a7a297399 Suppress "runtime JAR files version mismatch" warnings in some plugins 2021-01-13 19:34:24 +01:00
Alexander Udalov f273edeb8e Build: upgrade language to 1.3 in cli, compiler plugins and Gradle plugin
The language/API version restriction here is to make sure the code works
with Gradle of earlier versions, but all versions of Gradle that we
support already depend on Kotlin 1.3+.
2020-09-22 19:10:58 +02:00
Sergey Igushkin 8ba131290a Fixup for 1f5fa5eb7 – adjust error message 2020-06-30 13:14:03 +03:00
Sergey Igushkin 1f5fa5eb7c Add back empty stub implementations of KotlinGradleSubplugin (KT-39809)
* If a KotlinGradleSubplugin implements
 KotlinCompilerPluginSupportPlugin, don't apply it as a legacy plugin

* Add the legacy KotlinGradleSubplugin implementations back so that
 when there's JAR hell with META-INF/services in the old artifacts
 pointing to the classes, loading the plugins with ServiceLoader (legacy
 implementation) from the new artifacts would not fail.

* There's a corner case for plugins not in kotlin-gradle-plugin
 If a newer and older version of such a subplugin is used with an older
 version of the Kotlin Gradle plugin, the latter will find the META-INF
 entries and will try to load the subplugins from the new version. With
 the original fix for KT-39809, this would result in silently ignored
 empty stub implementations.

 Given that the Kotlin Gradle plugin can now check if a subplugin
 supports the new API, it's OK to keep the old entries and make the
 stub implementations throw a build error when called, so that improper
 plugin versions are not ignored and are clearly reported.

 Note that this is only necessary for the subplugins not bundled in the
 kotlin-gradle-plugin module, as those will always be in sync with the
 Kotlin version.

Issue #KT-39809 Fixed
2020-06-30 12:51:51 +03:00
Sergey Igushkin f7b660b573 (minor) Fixes for review KT-MR-1290 2020-06-19 17:31:51 +03:00
Sergey Igushkin f2bc391bdd Rework AllOpenSubplugin for the new subplugins API 2020-06-19 17:30:07 +03:00
Vyacheslav Gerasimov eeb2f7d3d1 Build: Migrate plugin markers to maven-publish publication 2020-06-14 20:31:27 +03:00
Vyacheslav Gerasimov 94b4f4a91a Build: Remove configureJvmProject helper for groovy script
It duplicates allprojects configuration done in root project
2020-06-14 20:31:26 +03:00
Vyacheslav Gerasimov c2589c7d6d Build: Rename javadocJar for groovy to configureJavadocJar
So it doesn't interfere with javadocJar task accessor
2020-06-14 20:31:25 +03:00
Ilya Chernikov 0f41dc814f Switch many common tasks defined in buildSrc to lazy creation
also refactor some locally defined tasks to the creation avoidance API
2019-08-21 20:20:08 +02:00
Vyacheslav Gerasimov 8851029baa Build: Use embedded configuration for compiler plugins 2019-04-29 16:23:16 +03:00
nikita.movshin 65244b4bea Update copyright.
Change the copyright from "JetBrains s.r.o." to
"JetBrains s.r.o. and Kotlin Project contributors"
Update only 2 lines copyright.
2019-04-23 20:09:22 +03:00
Yan Zhulanow 0dfe122a40 Pill: Mark more projects as 'jps-compatible' in FULL variant 2019-04-15 05:17:03 +03:00
Yan Zhulanow 7ecd88aae3 AllOpen: Allow to specify presets in the Gradle plugin 2019-04-11 17:46:20 +03:00
Vyacheslav Gerasimov 14d9ec9fb2 Build: Use javadocJar helper to specify artifact explicitly
Creating javadocJar task for every project produces lots of unnecessary
tasks, some project don't even have code. Jar task without outDir
property set fails idea import with gradle 5.0+
2019-02-18 19:59:36 +03:00
Vyacheslav Gerasimov f58acbeef5 Build: implement useBootstrapStdlib flag
Excludes stdlib projects from build and uses bootstrap stdlib artifacts

 #KT-29205
2019-01-21 21:09:40 +03:00
Sergey Igushkin 581b161611 Expose statically-typed kotlinOptions and compileKotlinTask in DSL
To simplify configuring a `KotlinCompilation` with Gradle Kotlin DSL, it
is essential to expose statically-known types where possible.

This commit parametrizes `KotlinCompilation` with its Kotlin options
type (a subtype of `KotlinCommonOptions`) and adds `kotlinOptions` and
`compileKotlinTask` to `KotlinCompilation`.

(minor) Also reduce the visibility of `attachClassesDir` and
`setupPlugins` to internal, since this API is not for external use.
2018-11-27 19:47:38 +03:00
Ilya Gorbunov 8102e512d3 For bootstrapping on 1.3-M1: compile parts that can be used in .gradle.kts scripts with 1.2 language version 2018-08-30 14:50:23 +03:00
Sergey Igushkin dc7d488deb Update existing plugin implementations to use KotlinCompilation
Add default implementations for KotlinTarget and KotlinCompilation
(some of them are used in code added by further commits).

Refactor AbstractKotlinPlugin so that parts of its logic can be easily
applied outside the plugin (needed for MPP plugin later).

The single platform Kotlin plugins having Kotlin compiled along with
Java will now create a KotlinCompilation and a KotlinSourceSet per Java
source set or per Android variant.
The build configuration logic will use KotlinCompilation
objects rather than Java or Android plugin entities.

Subplugins API and implementations are updated to use KotlinCompilation.
2018-08-07 15:55:44 +03:00
Lucas Smaira 49292cd26c Move model interfaces code from Java to Kotlin 2018-07-30 19:08:04 +03:00
Lucas Smaira 3588547d8c Remove *ImplTest for Kotlin Gradle Models
Equality should already be guaranteed by Kotlin data classes.
2018-07-30 19:08:04 +03:00
Lucas Smaira 5a423e8dcd Introduce tooling model for annotation based projects
Introduce Gradle models for plugins 'kotlin-allopen', 'kotlin-noarg' and
'kotlin-sam-with-receiver'. Corresponding model builders are registered
in each one of those plugin main classes.
2018-07-30 19:08:04 +03:00
Alexey Tsvetkov 873de17056 Resolve compiler plugin classpath using 'kotlinCompilerPluginClasspath' configuration
#KT-24653 fixed
        #KT-24676 fixed
2018-06-01 23:13:36 +03:00
Sergey Igushkin 0c78a2c026 Remove some of the remaining mentions of repository.jetbrains.com 2018-01-23 23:35:50 +03:00
Sergey Igushkin 5deb20543f Get rid of gradle-api artifacts uploaded to and used from JB repo
Remove redundant Maven dependency to `gradle-api` scoped as provided
2018-01-17 18:45:26 +03:00
Ilya Chernikov 050403d15b Use rewriteDeps task on the projects with runtime dependency on embeddable compiler...
which are using shaded dependencies
2017-10-16 21:48:35 +02:00
Ilya Chernikov df04efcf14 Rename artifacts, fix dependencies and artifact contents 2017-09-20 11:52:00 +02:00
Ilya Chernikov a8c45819a1 Fix sources/javadoc artifactsi in gradle tools, separating android extensions runtime 2017-09-20 11:51:37 +02:00
Ilya Chernikov cf7312dea8 Add gradle plugin markers 2017-09-20 11:51:29 +02:00
Ilya Chernikov e18b77af21 Refactor compiler-related published projects
- move preparation into separate projects
- rename projects for publishing
- add compiler plugins
2017-09-19 21:37:14 +02:00
Ilya Chernikov 438525dfff Proper import of the gradle part:
- using non-shadowed libs
- stop preshgadowing plugins
- switch to project dependencies
- add annotation processing module
2017-09-19 21:37:12 +02:00
Sergey Igushkin 8fd508566a Add Gradle plugin marker artifacts for the Gradle plugins.
This allows for the Gradle plugins DSL to resolve the plugins from
a custom repository.
https://docs.gradle.org/current/userguide/plugins.html#sec:plugin_markers
2017-08-07 14:17:43 +03:00
Ilya Gorbunov d8ea3ddcc8 Cleanup poms of projects migrated to gradle 2017-07-21 20:15:34 +03:00
Yan Zhulanow f4acf404ca Android Extensions: Support Android variants and library dependencies (KT-14086, KT-16934) 2017-07-18 18:08:31 +03:00
Sergey Igushkin a4be282074 Add Gradle Plugin Portal publication to the buildscripts
Add option to disable signing (-PnoSign), to be used when publishing
pre-built artifacts

Add option to define specific version for publishing, to be used when
publishing test versions

(cherry picked from commit dcd55e9)
2017-06-29 20:59:36 +03:00
Sergey Igushkin 8e65b5f2c8 Gradle plugins migration to Gradle build
* Add gradle-tools subproject
* Add Gradle buildscripts to the related projects
* Remove the projects from the libraries pom.xml
* Move AndroidGradleWrapper.groovy to separate source root
* Changed artifact dependencies to project dependencies where needed
* Extract common configuration into commonConfiguration.gradle
* (convert functions to closures to be able to call them)
* Refactor DSL usage
* Replace `project.properties` with `findProperty`
* Unify Gradle wrapper between `libraries` and `gradle-tools`
(as a temporary solution, just made the wrapper files the same)
2017-05-10 20:03:26 +03:00
Yan Zhulanow 21da11fe18 Fix 'kotlin-spring' and 'kotlin-noarg' Gradle plugin importing (KT-17049)
Allopen and Noarg plugins now use 'presets' that should be handled in the Gradle importer as well.
2017-04-05 18:13:14 +03:00
Sergey Igushkin 999ef51653 Added gradle-plugins properties with fqnames
Added .property files to make the plugins available by fqnames in
order to publish them to Gradle Plugin Portal.

#KT-5756

(cherry picked from commit 991de64)
2017-03-09 14:13:40 +03:00
Yan Zhulanow 52ecd05301 AllOpen, NoArg: Use presets in Gradle plugins 2017-02-08 17:36:19 +03:00
Dmitry Jemerov ac4be88627 Prevent duplicate addition of "org.jetbrains.kotlin" prefix when copying sources to Maven projects 2017-02-02 14:06:55 +01:00
Yan Zhulanow 6abde4223b AllOpen: Add IDE integration 2016-12-09 20:01:07 +03:00
Yan Zhulanow ed7c38fb96 Allopen: Add allopen Gradle subplugin 2016-12-09 20:00:57 +03:00