Skip to content
Permalink
Browse files

analyzer: Implement support for Pub and Flutter

Implement support for the Dart package manager Pub [1] and Flutter [2].
For Flutter the implementation also analyzes native Android
dependencies. Support for analyzing native iOS dependencies is prepared
and can be added once CocoaPods is implemented.

[1] https://pub.dev/
[2] https://flutter.dev/

Signed-off-by: Marlon Hille <marlon.hille@here.com>
  • Loading branch information...
moo24 authored and mnonnenmacher committed May 17, 2019
1 parent 9d465e8 commit b384f64b7b36e096901566efa365ed4f888d5031
Showing with 18,816 additions and 1 deletion.
  1. +8 −0 .appveyor.yml
  2. +4 −0 .gitmodules
  3. +16 −1 .travis.yml
  4. +1 −0 analyzer/src/funTest/assets/projects/external/dart-http
  5. +1,453 −0 analyzer/src/funTest/assets/projects/external/dart-http-expected-output.yml
  6. 0 analyzer/src/funTest/assets/projects/synthetic/all-managers/pubspec.yaml
  7. +1,546 −0 analyzer/src/funTest/assets/projects/synthetic/pub-expected-output-any-version.yml
  8. +26 −0 analyzer/src/funTest/assets/projects/synthetic/pub-expected-output-no-lockfile.yml
  9. +14,286 −0 analyzer/src/funTest/assets/projects/synthetic/pub-expected-output-project-with-flutter.yml
  10. +2 −0 analyzer/src/funTest/assets/projects/synthetic/pub/any-version/.gitignore
  11. +362 −0 analyzer/src/funTest/assets/projects/synthetic/pub/any-version/pubspec.lock
  12. +18 −0 analyzer/src/funTest/assets/projects/synthetic/pub/any-version/pubspec.yaml
  13. +15 −0 analyzer/src/funTest/assets/projects/synthetic/pub/no-lockfile/pubspec.yaml
  14. +2 −0 analyzer/src/funTest/assets/projects/synthetic/pub/project-with-flutter/.gitignore
  15. +392 −0 analyzer/src/funTest/assets/projects/synthetic/pub/project-with-flutter/pubspec.lock
  16. +30 −0 analyzer/src/funTest/assets/projects/synthetic/pub/project-with-flutter/pubspec.yaml
  17. +133 −0 analyzer/src/funTest/kotlin/PubTest.kt
  18. +514 −0 analyzer/src/main/kotlin/managers/Pub.kt
  19. +1 −0 analyzer/src/main/resources/META-INF/services/com.here.ort.analyzer.PackageManagerFactory
  20. +1 −0 analyzer/src/test/kotlin/PackageManagerTest.kt
  21. +1 −0 downloader/src/test/kotlin/GitTest.kt
  22. +5 −0 model/src/main/kotlin/ProjectAnalyzerResult.kt
@@ -6,6 +6,8 @@ environment:
ANDROID_SDK_VERSION: 3859397
BOWER_VERSION: 1.8.8
COMPOSER_VERSION: 4.8.0
FLUTTER_HOME: C:\flutter
FLUTTER_VERSION: v1.7.8+hotfix.3-stable
GO_DEP_VERSION: 0.5.0
NPM_VERSION: 6.4.0
PHP_VERSION: 7.2.0
@@ -58,6 +60,12 @@ install:
- ps: Start-FileDownload "https://dl.google.com/android/repository/sdk-tools-windows-$env:ANDROID_SDK_VERSION.zip"
- 7z x sdk-tools-windows-%ANDROID_SDK_VERSION%.zip -o%ANDROID_HOME% > nul
- yes | %ANDROID_HOME%\tools\bin\sdkmanager.bat platform-tools
# Install Flutter.
- ps: Start-FileDownload "https://storage.googleapis.com/flutter_infra/releases/stable/windows/flutter_windows_$env:FLUTTER_VERSION.zip"
- 7z x flutter_windows_%FLUTTER_VERSION%.zip -oC:\ > nul
- set "PATH=%FLUTTER_HOME%\bin;%FLUTTER_HOME%\bin\cache\dart-sdk\bin;%PATH%"
- flutter config --no-analytics
- flutter doctor

# Do something useful here to override the default MSBuild (which would fail otherwise).
build_script:
@@ -34,3 +34,7 @@
path = analyzer/src/funTest/assets/projects/external/sbt-multi-project-example
url = https://github.com/pbassiner/sbt-multi-project-example.git
ignore = untracked
[submodule "dart-http"]
path = analyzer/src/funTest/assets/projects/external/dart-http
url = https://github.com/dart-lang/http.git
ignore = untracked
@@ -27,6 +27,8 @@ env:
- ANDROID_HOME="/opt/android"
- ANDROID_SDK_VERSION="4333796"
- BOWER_VERSION="1.8.8"
- FLUTTER_HOME="/opt/flutter"
- FLUTTER_VERSION="v1.7.8+hotfix.3-stable"
- GIMME_GO_VERSION="1.10" # Used internally by Travis.
- GO_DEP_VERSION="0.5.1"
- NPM_VERSION="6.4.0"
@@ -35,12 +37,20 @@ env:
- STACK_VERSION="2.1.3"
- YARN_VERSION="1.17.3"

addons:
apt:
# Flutter depends on /usr/lib/x86_64-linux-gnu/libstdc++.so.6 version GLIBCXX_3.4.18
sources:
- ubuntu-toolchain-r-test # if we don't specify this, the libstdc++6 we get is the wrong version
packages:
- cvs
- lib32stdc++6

before_install:
- sudo rm -f $JAVA_HOME/lib/security/cacerts
- sudo ln -s /etc/ssl/certs/java/cacerts $JAVA_HOME/lib/security/cacerts

install:
- sudo apt install -y cvs
- eval "$(gimme)"
- curl https://raw.githubusercontent.com/golang/dep/v$GO_DEP_VERSION/install.sh | sh
- npm install -g bower@$BOWER_VERSION npm@$NPM_VERSION yarn@$YARN_VERSION
@@ -56,6 +66,11 @@ install:
- unzip -q sdk-tools-linux-$ANDROID_SDK_VERSION.zip -d $ANDROID_HOME
- export SDKMANAGER_OPTS="--add-modules java.xml.bind"
- yes | $ANDROID_HOME/tools/bin/sdkmanager --verbose "platform-tools"
- curl -Os https://storage.googleapis.com/flutter_infra/releases/stable/linux/flutter_linux_$FLUTTER_VERSION.tar.xz
- tar xf flutter_linux_$FLUTTER_VERSION.tar.xz -C $(dirname $FLUTTER_HOME)
- export PATH="$PATH:$FLUTTER_HOME/bin:$FLUTTER_HOME/bin/cache/dart-sdk/bin"
- flutter config --no-analytics
- flutter doctor

script:
- set -o pipefail
Submodule dart-http added at 378179

0 comments on commit b384f64

Please sign in to comment.
You can’t perform that action at this time.