Chris Smowton
81e59e9005
Force Gradle tests to run sequentially
...
Otherwise starting multiple Gradle daemons in parallel can fail
2023-01-21 11:57:53 +00:00
Chris Smowton
4197d7bd20
Android tests: use Java 11 under Actions
...
Some runners still default to Java 8 (e.g. windows-2022 and macos-12), so we need to manually pull Java 11 in in such cases.
2023-01-21 11:57:53 +00:00
Chris Smowton
b6df415fe8
Add Android and Kotlin build script tests
...
This adds a single plain Gradle project that uses a modern Kotlin build script (i.e. settings.gradle.kts and no build.gradle.kts), plus basic Android samples exercising the possible permutations of: (old vs. new-style build script, Groovy vs. Kotlin build script, wrapper present vs. absent)
Old vs. new style tests our recognition of different cues that this is likely a Droid project and requires `gradle assemble` not `gradle testClasses` (the example given at https://developer.android.com/studio/build/#top-level changed style as of plugin version ~7.3.0).
Groovy vs. Kotlin build script language checks that the regexes recognising Android dependencies and versions work for both build script kinds.
Wrapper present vs. absent exercises the autobuilder logic that guesses an appropriate Gradle version and sets it up in the event the Gradle wrapper isn't provided.
2023-01-21 11:57:53 +00:00
Ian Lynagh
9ebe59d353
Merge pull request #11637 from igfoo/igfoo/kotlin-1.8
...
Kotlin: Add 1.8 support
2023-01-12 12:15:00 +00:00
Ian Lynagh
b7eb521fa0
Kotlin: Fix custom_plugin test for Kotlin 1.8.0
2023-01-10 14:41:30 +00:00
Ian Lynagh
c71ea80029
Kotlin: Accept test changes
...
We now get better locations, with Kotlin 1.8.0.
2023-01-10 14:41:30 +00:00
Ian Lynagh
b51c3aae85
Kotlin: Logs test: Allow for -Beta versions etc when parsing the logs
2023-01-10 14:41:29 +00:00
Tony Torralba
32471d326e
Java: Remove omittable exists variables
2023-01-10 13:37:19 +01:00
Chris Smowton
52297c0b23
Add Java autobuilder integration tests
2023-01-05 12:19:25 +00:00
Michael Nebel
c34bde962c
Java: Update integration tests to use implicit ext.yml data extensions.
2022-12-15 19:01:29 +01:00
Michael Nebel
fe3c8613cd
Java: Fix name of extensible in java integration test.
2022-12-14 15:25:47 +01:00
Michael Nebel
bc02adb400
Java: Make the corresponding rename in all the data extensions.
2022-12-14 13:48:31 +01:00
Chris Smowton
5282c86158
Apply review feedback
2022-12-09 18:07:14 +00:00
Chris Smowton
b8ed3b7dbf
Accept annotation test changes
...
These are notnull annotations that no longer get inappropriately attached to constructors
2022-12-09 12:57:20 +00:00
Chris Smowton
65dc0dc326
Add dummy extensible predicate definition to integration test
2022-12-09 11:17:37 +00:00
Chris Smowton
f5dc5155f9
Don't introduce @NotNull on Kotlin methods that already have that annotation
...
This usually can't happen, but delegates pointing at Java appear to be synthesised with this normally-hidden annotation
2022-12-09 10:33:05 +00:00
Chris Smowton
c8e2ae8563
Accept integration test changes
...
These introduce newly-extracted annotations, and note that enum constants no longer get type-access expressions in some circumstances
2022-12-09 10:33:05 +00:00
Chris Smowton
7a7c08b185
Tolerate generic annotations
...
This causes them to render properly in PrintAst output due to `getAnnotationElement` working as expected, and will hide the fact that they are represented by raw types in bytecode.
2022-12-09 10:33:05 +00:00
Chris Smowton
f6888c727f
PrintAst: Assign indices to annotation children that don't have source locations
...
This avoids them all tying at rank 1 as before.
2022-12-09 10:33:05 +00:00
Chris Smowton
70ebb41d67
Restore nullability annotations
...
This is imperfect since arguments to those annotations will be missing, but at least the common case of a plain `@NotNull` or `@Nullable` will be right, and the `@NotNull`s introduced by the Kotlin compiler will be present as expected.
2022-12-09 10:33:05 +00:00
Chris Smowton
8bbb34a498
Convert kotlin.Deprecated back into a no-arg java.lang.Deprecated if applicable
...
This at least maintains consistency with the Java extractor, although we lose its arguments if any were supplied Java-side.
2022-12-09 10:33:05 +00:00
Chris Smowton
658c7a20cf
Don't extract error expressions when a default value is missing
...
This is a shortcoming of the Kotlin extractor, but at least this way we don't introduce an inconsistency if the annotation is later seen from .kt source or by the Java extractor
2022-12-09 10:33:05 +00:00
Chris Smowton
5b2834c833
Restrict type access extraction to classes extracted from source
...
Type accesses have anonymous IDs, so we mimic the Java extractor and extract them only when seeing a class in a .kt source file.
2022-12-09 10:33:05 +00:00
Chris Smowton
f9b878fe98
Add test for .kt defined, Java used repeatable annotation
2022-12-09 10:33:04 +00:00
Chris Smowton
73df3166eb
Test varargs annotation
2022-12-09 10:33:04 +00:00
Chris Smowton
6d5f962c56
Accept test changes (implicit annotations, restoration of annotation type accesses)
2022-12-09 10:33:03 +00:00
Chris Smowton
d96bca071d
Add test for repeatable annotations
2022-12-09 10:33:03 +00:00
Chris Smowton
06133e74a5
Handle generic annotations
2022-12-09 10:31:34 +00:00
Chris Smowton
14a47f628c
Fixup: remove unneeded test file
2022-12-09 10:31:34 +00:00
Chris Smowton
d7213d2d82
Only convert KClass -> Class in annotation context
2022-12-09 10:31:34 +00:00
Chris Smowton
2fd8e61fe2
Add test of Java/Kotlin annotation naming consistency
2022-12-09 10:31:34 +00:00
Chris Smowton
c68ac460c9
Accept test changes: again this is a raw class extracted just for its signature.
2022-12-06 18:38:33 +00:00
Chris Smowton
407e4cdd07
Don't create a default constructor for annotations, or classes that explicitly declare a no-arg constructor.
2022-12-05 16:17:51 +00:00
Chris Smowton
1c0494ec53
Extract a no-arg constuctor whenever a Kotlin class has default values for all parameters
2022-12-02 20:07:43 +00:00
Michael Nebel
9c93402b26
Java: Convert integration test to use data extensions instead of inlined models.
2022-11-28 12:30:35 +01:00
Michael Nebel
157a228088
Java: Add query packs with names to enable dependency resolution.
2022-11-28 12:30:35 +01:00
Michael Nebel
2d309bb8f8
Java: Include the library query pack to get the data extensions included.
2022-11-28 12:30:35 +01:00
Chris Smowton
0879f02db6
Adapt custom_plugin test to Kotlin 1.7.20
2022-11-25 17:54:53 +00:00
Chris Smowton
180c3cee44
Accept integration test changes caused by variable location changes
2022-11-25 10:54:50 +00:00
Chris Smowton
cf34dbd276
Kotlin: format string literals like the Java annotaton extractor
...
Java's regular strings are formatted as they appear in source, but we don't easily have this information available in Kotlin. During annotation extraction however it guesses a source rendering because the source is not necessarily available. By formatting to match the annotation extractor, we prepare to ensure consistency with a Java database
when extracting annotations as seen by Kotlin.
2022-11-17 17:28:17 +00:00
Ian Lynagh
a2c0d47e9c
Merge pull request #11199 from igfoo/igfoo/kotlin_default
...
Kotlin: Update docs and tests
2022-11-10 14:53:06 +00:00
Ian Lynagh
eea062d357
Merge pull request #11053 from igfoo/igfoo/java-interface-redeclares-tostring
...
Kotlin: Run java-interface-redeclares-tostring on all platforms
2022-11-10 12:14:49 +00:00
Ian Lynagh
fd6ae3a216
Kotlin: Accept test output
2022-11-09 15:59:15 +00:00
Chris Smowton
ca04779dfc
Kotlin: fix extraction of Java nested wildcards; wildcards in return types
...
This fixes two mistakes: return-type extraction not imposing a wildcard where a Java prototype explicitly uses one, and nested wildcard detection quietly failing due to not looking through a `JavaWildcardType` correctly.
I add a variant of the `kotlin_java_lowering_wildcards` test where Java prototypes are only seen from Kotlin, to be sure extraction is working as expected.
2022-11-04 11:39:26 +00:00
Chris Smowton
44b0f1921f
Merge pull request #11090 from smowton/smowton/fix/value-parameter-label-external-class
...
Kotlin: drop same-file requirement for overridden parameter labels
2022-11-03 10:17:33 +00:00
Chris Smowton
8e240a2e84
Kotlin: drop same-file requirement for overridden parameter labels
2022-11-02 19:28:53 +00:00
Ian Lynagh
c2339b1203
Merge pull request #11050 from igfoo/igfoo/compiler_arguments
...
Kotlin: Run compiler_arguments test on all platforms
2022-11-02 14:07:36 +00:00
Ian Lynagh
285ff54853
Merge pull request #11052 from igfoo/igfoo/default-parameter-mad-flow
...
Kotlin: Run default-parameter-mad-flow on all platforms
2022-11-02 14:07:27 +00:00
Ian Lynagh
60fe5d6428
Merge pull request #11054 from igfoo/igfoo/gradle_kotlinx_serialization
...
Kotlin: Reunite the parts of gradle_kotlinx_serialization
2022-11-02 14:07:10 +00:00
Tamas Vajk
91972d1d1f
Kotlin: Fix location (start position) of method calls
2022-10-31 21:08:15 +01:00