Commit Graph

1892 Commits

Author SHA1 Message Date
Sergey Igushkin 2cad64881d (minor) Improve exception message in case no Android plugin was found 2017-06-06 17:21:20 +03:00
Sergey Igushkin 21b88995ab Add tests for the introduced fixes
Add a test for applying kotlin-android plugin with com.android.feature

Add a test for Databinding (not passing yet with 3.0.0+, until
3.0.0-alpha4 is released, which contains the fix from the Android side).

Add missing test project android-databinding.

Refactor and improve the tests

* Remove redundant files from test project 'android-databinding'
* Refactoring and minor improvements in the tests
2017-06-06 17:21:20 +03:00
Sergey Igushkin 483218e491 Fix for the Databinding issue where the kapt task started to early, not
letting the Databinding pre-process the project.
2017-06-06 17:21:20 +03:00
Sergey Igushkin f053d79994 Add support for com.android.feature plugin. 2017-06-06 17:21:20 +03:00
Alexander Udalov 751ff48301 Extract logic of builtins package fragment provider creation
This allows to drop the compile dependency of module 'descriptors' on
'deserialization', breaking the circular dependency between them
2017-06-06 14:29:20 +03:00
Alexander Udalov a4931568ba Relocate service definition files for kotlin-reflect
See
http://imperceptiblethoughts.com/shadow/#merging_service_descriptor_files

 #KT-16810 Fixed
2017-06-06 14:29:17 +03:00
Alexey Tsvetkov 5a22917f82 Run Gradle Android tests with other Gradle tests 2017-05-31 16:59:03 +03:00
Alexey Tsvetkov aa9a40b61b Add tests with new Android Gradle Plugin 2017-05-31 16:59:03 +03:00
Sergey Igushkin dce6a4f869 Fix UnsupportedOperationException caused by mutation of FileCollection 2017-05-31 16:59:03 +03:00
Sergey Igushkin a68f7d79f5 Migration to AGP 2.3.0 2017-05-31 16:59:03 +03:00
Sergey Igushkin 6e721c4cee Further fixes for Android tests on TeamCity
Added support repository to download_android_sdk.xml
Changed the build tools version in testProject to 23.0.1

(trial) Remove platform 22
2017-05-31 16:59:03 +03:00
Sergey Igushkin 227a1d5fa0 Got rid of the sdk-manager plugin. 2017-05-31 16:59:03 +03:00
Alexey Tsvetkov 18505157e0 Fix failing Gradle tests
* Extract ANDROID_HOME_PATH constant
* Set ANDROID_HOME_PATH to dependencies/androidSDK
* Running download_android_sdk.xml is now needed to run Gradle Integration Tests
* Modify download_android_sdk.xml so that tools/android is executable

(cherry picked from commit 75a6e37)
2017-05-31 16:59:03 +03:00
Alexey Tsvetkov 6e07b1cd99 Gradle: set default values of languageVersion and apiVersion to null
Before the change, Gradle always explicitly set language and api
version to the latest version, preventing the compiler
from inferencing the arguments.

     #KT-18047 fixed
2017-05-31 16:59:03 +03:00
Alexey Tsvetkov 5fbb41bf86 Stabilize test of Gradle's daemon for memory leaks
We need to wait for GC to finish, because GC can be concurrent
2017-05-31 16:59:03 +03:00
Alexey Tsvetkov d80a463735 Report memory usage only when system property is set
This improves performance of Gradle builds with debug logging (--debug),
because System.gc is now forced only when the system property
'kotlin.gradle.test.report.memory.usage' is set.

    #KT-17960 fixed
2017-05-31 16:59:03 +03:00
Alexey Tsvetkov a6a829c272 Improve test error message 2017-05-31 16:59:03 +03:00
Alexey Tsvetkov e1457ffea0 Limit max number of active Gradle processes for the test run
This is needed to avoid retaining memory by each Gradle version
which is critical for running tests on CI server.
2017-05-31 16:59:03 +03:00
Alexey Tsvetkov 2fa8a1139f Refactor Gradle ITs so any Gradle wrapper version can be used
This change:
* fixes tests with missing (in branch 1.1.3) GradleWrapper-3.4
* enables using any Gradle version in integration tests
without adding a new GradleWrapper-<version> dir.

The only difference between wrappers is in a version
number in a `gradle-wrapper.properties` file.
I removed all but one wrappers from `test/resources`,
and replaced the version with the template token <GRADLE_WRAPPER_VERSION>
for the remaining wrapper.
During a test run a template wrapper for each required version
is copied to a temporary directory.
2017-05-31 16:59:03 +03:00
Alexey Tsvetkov be1b1029a4 Minor: add .gitignore for gradle-tools 2017-05-31 16:59:03 +03:00
Alexey Tsvetkov a8263361c0 Fix tests for coroutines setting in Gradle
ArgumentUtils#convertArgumentsToStringList does not
serialize an argument with default value,
so the string "-Xcoroutines=warn" was no longer present in logs.
2017-05-31 16:59:03 +03:00
Alexey Tsvetkov 0a17dc3229 Refactor kapt tasks' wiring
* Unify tasks wiring for new and old Android Gradle Plugin
* rename wireKaptTask->registerGeneratedJavaSource
2017-05-31 16:59:03 +03:00
Alexey Tsvetkov e529592d15 Pass task object instead of task name to dependsOn
This simplifies filtering out dependsOn later
2017-05-31 16:59:03 +03:00
Alexey Tsvetkov c8d05f8485 Remove most of Gradle tests with Jack
Jack is deprecated and Kotlin Gradle plugin throws,
so one test checking that build is failing with the exception
is enough.
2017-05-31 16:59:02 +03:00
Alexey Tsvetkov 0cb67b4052 Minor: simplify expression 2017-05-31 16:59:02 +03:00
Alexey Tsvetkov c20d569aaa Simplify friend paths configuration 2017-05-31 16:59:02 +03:00
Sergey Igushkin 3e95a551e0 Various fixes
* Expose internals as public to use them in the agp25 source set
* Refactor of Android25ProjectHandler.kt
* Fix Kapt3 for non-Android projects
2017-05-31 16:59:02 +03:00
Sergey Igushkin 546a26a4cd Fix Kapt task depending on compileKotlin because of incorrect filtering
of compileJava dependencies

(cherry picked from commit 9a2c3b0)
2017-05-31 16:59:02 +03:00
Alexey Tsvetkov 95d3d3057a Update gradle wrapper permissions
It was not executable on linux
2017-05-31 16:59:02 +03:00
Sergey Igushkin a82c0c843e Use the Google Maven repository instead of local preview.
(cherry picked from commit 4279335)

(cherry picked from commit 0e8b850)
2017-05-31 16:59:02 +03:00
Sergey Igushkin edd22310c0 (minor) Fix missing dependency on JUnit
(cherry picked from commit 7ad5d04)
2017-05-31 16:59:02 +03:00
Sergey Igushkin 1bc0e8a276 Fix friend paths configuration with the new API for compile*Test tasks
Add lazy `friendClasspathEntries` to KotlinCompile
Set `friendClasspathEntries` in the Android25Pro
Change to AGP 3.0.0-alpha1;

(cherry picked from commit 1d6dd5c)

(cherry picked from commit 6cdf501)
2017-05-31 16:59:02 +03:00
Sergey Igushkin 7fae7c1d55 Fix registering the non-existent Kapt3 classes directory as bytecode if
Kapt3 is disabled.

(cherry picked from commit 692e23c)

(cherry picked from commit 1cbdb6c)
2017-05-31 16:59:02 +03:00
Sergey Igushkin 77031ab6f9 Change the legacy API threshold to 2.5.0
(cherry picked from commit fca2e23)

(cherry picked from commit 9394d15)
2017-05-31 16:59:02 +03:00
Sergey Igushkin d2a08c5fe4 Tasks wiring improvements & Kapt3 integration through variant wrapping 2017-05-31 16:59:02 +03:00
Sergey Igushkin b0c2c4eba9 Task wiring
* Generalized tasks wiring
* Moved the old implementation to LegacyAndroidAndroidProjectHandler.kt
* Added an implementation with the new AGP API

(cherry picked from commit 1b4592d)

(cherry picked from commit 50a75d4)
2017-05-31 16:59:02 +03:00
Sergey Igushkin eb71dee9cc Add prototype against the new AGP API
* Add a separate Gradle source set, that is compiled against the new
  versions of AGP and Gradle

* Separate the public AGP API usages from the old internal API usages
  in KotlinPlugin.kt -- see AbstractAndroidProjectHandler

* Implement Android25ProjectHandler with the new AGP API, wired it
  to KotlinAndroidPlugin through reflection

(cherry picked from commit e6dbf54)

(cherry picked from commit 88e3d4b)
2017-05-31 16:59:02 +03:00
Alexey Tsvetkov fd9e42a233 Do not print OUTPUT message as warning in Maven
Before the change Maven + IC had been reporting OUTPUT
messages as warnings since OUTPUT was removed
from CompilerMessageSeverity.VERBOSE
2017-05-26 15:16:41 +03:00
Ilya Chernikov f00149ad05 Reuse daemon launching logic for out-of-process compilation in gradle 2017-05-24 10:52:36 +02:00
Denis Zharkov 970dfd10d4 Update rendered public API for coroutines
suspendCoroutine is not public anymore as it's inline
and all inline suspend functions are treated as inline-only,
i.e. private in JVM
2017-05-23 18:45:33 +03:00
Yan Zhulanow 18e17a4400 Android Extensions: Remove obsolete migration warning in Gradle plugin 2017-05-23 16:45:24 +03:00
Denis Zharkov eedc35aefd Drop new coroutine-related API introduced in 1.1.4
See 49453ca705 for clarification

 #KT-17898 Fixed
2017-05-22 14:51:04 +03:00
Ilya Gorbunov fec8f4a48b preparePublication task requires project version to be set 2017-05-19 05:37:58 +03:00
baratynskiy 09e4ea55c7 kotlin-maven-plugin: add tools.jar dependency if -Xuse-javac is specified 2017-05-17 17:48:47 +03:00
Sergey Igushkin 74288ff8ae Fix main and test compilation tasks having different module name in
free compiler args.
2017-05-16 17:35:45 +03:00
Denis Zharkov 57cb556efd Update rendered public API in coroutines package
- suspendCoroutine is not public anymore, since all of the
inline functions are generated as private
- `label` is public to allow update it from the named functions
2017-05-16 11:38:59 +03:00
Sergey Mashkov fd0578b564 KT-10028 Support parallel builds in maven
Mark mojo's as thread safe as users confirmed that all related errors
seem to be fixed
2017-05-15 12:55:33 +03:00
Sergey Igushkin 7097246866 Unify build output with Maven
* Added manifest properties to `gradle-tools` projects.
* Add `-kotlin-module` to free compiler args to make the module names
  match the ones in Maven build
* Fixed path to the Groovy sources in `kotlin-gradle-plugin/pom.xml`
2017-05-10 20:15:08 +03:00
Sergey Igushkin 7030b89b7c Fix rootDir mis-use in commonConfiguration.gradle:
replace with `kotlin_root`, that is set in the projects
2017-05-10 20:03:26 +03:00
Sergey Igushkin c3ae37c6ce Gradle build fixes & improvements:
* Fix Java not compiled in kotlin-gradle-plugin Kotlin source set
* Fix the integration tests running under Java 6
* Fix kotlin-gradle-subplugin-example not being installed -- needed
  for a test
* Fix Android tests being always excluded
* Move versions out of `build.gradle` (x2) to a common `versions.gradle`
* Move JDK, dist and bootstrap to `commonConfiguration.gradle`
* Build `kotlin-gradle-plugin` with JDK_18
2017-05-10 20:03:26 +03:00