Skip to content

Commit 3a14ae8

Browse files
anthonykeenanKatelyn Baker
authored andcommitted
CORDA-1178 - Api scanner backport and update of api-current.txt (#2813)
* Api scanner backport and update of api-current.txt * Updated api-current based on current state of release branch * Update to most recent version of api scanner * Fix a couple of issues with the merge and regenerate the api file with the most recent version of the scanner. * Update changelog/release notes
1 parent 33b34a3 commit 3a14ae8

File tree

102 files changed

+2556
-113
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+2556
-113
lines changed

.ci/api-current.txt

Lines changed: 116 additions & 74 deletions
Large diffs are not rendered by default.

constants.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
gradlePluginsVersion=3.0.9
1+
gradlePluginsVersion=3.1.0
22
kotlinVersion=1.1.60
33
platformVersion=3
44
guavaVersion=21.0

docs/source/changelog.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ Changelog
44
Here are brief summaries of what's changed between each snapshot release. This includes guidance on how to upgrade code
55
from the previous milestone release.
66

7+
.. _changelog_v3_1:
8+
9+
Version 3.1
10+
-----------
11+
12+
* Updated the api scanner gradle plugin to work the same way as the version in master. These changes make the api scanner more
13+
accurate and fix a couple of bugs, and change the format of the api-current.txt file slightly. Backporting these changes
14+
to the v3 branch will make it easier for us to ensure that apis are stable for future versions. These changes are
15+
released in gradle plugins version 3.0.10. For more information on the api scanner see
16+
the `documentation <https://github.com/corda/corda-gradle-plugins/tree/master/api-scanner>`_.
17+
718
.. _changelog_v3:
819

920
Version 3.0

docs/source/upgrade-notes.rst

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,31 @@ versions you are currently using are still in force.
2828

2929
We also strongly recommend cross referencing with the :doc:`changelog` to confirm changes.
3030

31+
v3.0 to v3.1
32+
------------
33+
34+
Gradle Plugin Version
35+
^^^^^^^^^^^^^^^^^^^^^
36+
37+
Corda 3.1 uses version 3.1.0 of the gradle plugins and your ``build.gradle`` file should be updated to reflect this.
38+
39+
.. sourcecode:: shell
40+
41+
ext.corda_gradle_plugins_version = '3.1.0'
42+
43+
You will also need to update the ``corda_release_version`` identifier in your project gradle file.
44+
45+
.. sourcecode:: shell
46+
47+
ext.corda_release_version = 'corda-3.1'
48+
3149
V2.0 to V3.0
3250
------------
3351

3452
Gradle Plugin Version
3553
^^^^^^^^^^^^^^^^^^^^^
3654

37-
Corda 3.0 uses version 3.0.8 of the gradle plugins and your ``build.gradle`` file should be updated to reflect this.
55+
Corda 3.0 uses version 3.0.9 of the gradle plugins and your ``build.gradle`` file should be updated to reflect this.
3856

3957
.. sourcecode:: shell
4058

gradle-plugins/api-scanner/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Generates a text summary of Corda's public API that we can check for API-breakin
66
$ gradlew generateApi
77
```
88

9-
See [here](../../docs/source/corda-api.rst) for Corda's public API strategy. We will need to
9+
See [here](https://github.com/corda/corda/blob/master/docs/source/corda-api.rst) for Corda's public API strategy. We will need to
1010
apply this plugin to other modules in future Corda releases as those modules' APIs stabilise.
1111

1212
Basically, this plugin will document a module's `public` and `protected` classes/methods/fields,
@@ -76,4 +76,4 @@ or in any of that project's subprojects. So it is _theoretically_ possible also
7676
from subtrees of modules simply by defining a new `GenerateApi` task at the root of that subtree.
7777

7878
## Plugin Installation
79-
See [here](../README.rst) for full installation instructions.
79+
See [here](../README.md) for full installation instructions.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
apply plugin: 'java'
2+
3+
description 'A library of annotations for testing API Scanner.'
4+
5+
jar {
6+
archiveName 'annotations.jar'
7+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package net.corda.annotation;
2+
3+
import java.lang.annotation.Inherited;
4+
import java.lang.annotation.Retention;
5+
import java.lang.annotation.Target;
6+
7+
import static java.lang.annotation.ElementType.*;
8+
import static java.lang.annotation.RetentionPolicy.*;
9+
10+
@Target({TYPE, METHOD})
11+
@Retention(CLASS)
12+
@Inherited
13+
public @interface AlsoInherited {
14+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package net.corda.annotation;
2+
3+
import java.lang.annotation.Inherited;
4+
import java.lang.annotation.Retention;
5+
import java.lang.annotation.Target;
6+
7+
import static java.lang.annotation.ElementType.*;
8+
import static java.lang.annotation.RetentionPolicy.*;
9+
10+
@Target({TYPE, METHOD})
11+
@Retention(CLASS)
12+
@Inherited
13+
public @interface IsInherited {
14+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package net.corda.annotation;
2+
3+
import java.lang.annotation.Retention;
4+
import java.lang.annotation.Target;
5+
6+
import static java.lang.annotation.ElementType.*;
7+
import static java.lang.annotation.RetentionPolicy.*;
8+
9+
@Target({TYPE, METHOD})
10+
@Retention(CLASS)
11+
public @interface NotInherited {
12+
}

gradle-plugins/api-scanner/build.gradle

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: 'java'
2+
apply plugin: 'java-gradle-plugin'
23
apply plugin: 'net.corda.plugins.publish-utils'
34
apply plugin: 'com.jfrog.artifactory'
45

@@ -7,15 +8,36 @@ description "Generates a summary of the artifact's public API"
78
repositories {
89
mavenLocal()
910
mavenCentral()
11+
jcenter()
12+
}
13+
14+
gradlePlugin {
15+
plugins {
16+
apiScannerPlugin {
17+
id = 'net.corda.plugins.api-scanner'
18+
implementationClass = 'net.corda.plugins.ApiScanner'
19+
}
20+
}
1021
}
1122

1223
dependencies {
13-
compile gradleApi()
1424
compile "io.github.lukehutch:fast-classpath-scanner:2.7.0"
15-
testCompile "junit:junit:4.12"
25+
testCompile "org.assertj:assertj-core:$assertj_version"
26+
testCompile "junit:junit:$junit_version"
27+
28+
// This dependency is only to prevent IntelliJ from choking
29+
// on the Kotlin classes in the test/resources directory.
30+
testCompile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
31+
testCompile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
32+
testCompile project(':api-scanner:annotations')
33+
}
34+
35+
processTestResources {
36+
filesMatching('**/kotlin-*/build.gradle') {
37+
expand(['kotlin_version': kotlin_version])
38+
}
1639
}
1740

1841
publish {
1942
name project.name
2043
}
21-

0 commit comments

Comments
 (0)