ecocode-android

Reduce the environmental footprint of your Java-based Android apps with SonarQube

https://github.com/green-code-initiative/ecocode-android

Science Score: 57.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.1%) to scientific vocabulary

Keywords

android mobile native sonarqube sonarqube-plugin
Last synced: 6 months ago · JSON representation ·

Repository

Reduce the environmental footprint of your Java-based Android apps with SonarQube

Basic Info
  • Host: GitHub
  • Owner: green-code-initiative
  • License: gpl-3.0
  • Language: Groovy
  • Default Branch: main
  • Homepage: https://ecocode.io
  • Size: 9.37 MB
Statistics
  • Stars: 64
  • Watchers: 10
  • Forks: 27
  • Open Issues: 17
  • Releases: 5
Topics
android mobile native sonarqube sonarqube-plugin
Created about 3 years ago · Last pushed 9 months ago
Metadata Files
Readme Changelog Contributing Citation

README.md

Logo

Mobile apps running on top of battery-limited, android-powered devices are more than others concerned by the reduction of their environmental footprint. Hence, we created ecoCode android, the version of ecoCode project fully dedicated to the Android platform. It provides static code analyzers to highlight code structures that may have a negative ecological impact: energy over-consumption, "fatware", shortening devices' lifespan, etc.

ecoCode android is based on an evolving catalog of best practices for Android. A SonarQube plugin then implements this catalog as rules for scanning your native Android projects written in Java only. To learn more, take a look at the complete presentation (:fr:) or the presentation in a nutshell. A hands-on tutorial and free demo access is also available (:fr:).

License: GPL v3

🌿 SonarQube Plugin

Screenshot

The custom GUI above is reserved to educational purpose only.

🚀 Quickstart

A SonarQube container image with ecoCode Android embedded exists !

bash docker run -ti --rm \ -v sq_ecocode_android_logs:/opt/sonarqube/logs \ -v sq_ecocode_android_data:/opt/sonarqube/data \ -p 9000:9000 \ --name sonarqube-ecocode-android \ ghcr.io/green-code-initiative/sonarqube-ecocode-android:latest

Wait a little bit during first start initialization, and go to http://localhost:9000. Default credentials are admin/admin

🤝 Partners

Snapp’ Université de Pau Région Nouvelle-Aquitaine Solocal / PagesJaunes

📢 Cite this work

If you use ecoCode in an academic work we would be really glad if you cite our seminal paper using the following bibtex entry:

bibtex @inproceedings{10.1145/3551349.3559518, author = {Le Goaer, Olivier and Hertout, Julien}, title = {ecoCode: A SonarQube Plugin to Remove Energy Smells from Android Projects}, year = {2023}, isbn = {9781450394758}, publisher = {Association for Computing Machinery}, address = {New York, NY, USA}, url = {https://doi.org/10.1145/3551349.3559518}, doi = {10.1145/3551349.3559518}, booktitle = {37th IEEE/ACM International Conference on Automated Software Engineering}, articleno = {157}, numpages = {4}, keywords = {android, energy, smells, debt, quality, battery}, location = {Rochester, MI, USA}, series = {ASE22} }

🛒 Distribution

Ready to use binaries are available from GitHub.

🧩 Plugins version compatibility

| Plugins Version | SonarQube version | |-----------------|-----------------------------| | 0.0.+ | SonarQube 8.9.+ LTS to 9.3 | | 0.1.+ | SonarQube 9.4.+ LTS to 9.9 | | 1.0.+ | SonarQube 9.4.+ LTS to 9.9 | | 1.1.+ | SonarQube 9.4.+ LTS to 10.3 |

☕ Plugin Java part compatibility

| Plugins Version | Java version | |------------------|--------------| | 0.0.+ | 11 / 17 | | 0.1.+ | 11 / 17 | | 1.0.+ | 11 / 17 | | 1.1.+ | 11 / 17 |

Owner

  • Name: Green Code Initiative
  • Login: green-code-initiative
  • Kind: organization
  • Email: contact@green-code-initiative.org
  • Location: France

Let's write low-carbon software

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
preferred-citation:
  type: conference-paper
  conference:
    name: "Automated Software Engineering"
  collection-title: "Proceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering"
  publisher: ACM
  authors:
  - family-names: "Le Goaër"
    given-names: "Olivier"
    orcid: "https://orcid.org/0000-0001-5405-1688"
  - family-names: "Hertout"
    given-names: "Julien"
  title: "ecoCode: A SonarQube Plugin to Remove Energy Smells from Android Projects"
  doi: 10.1145/3551349.3559518
  year: 2022

GitHub Events

Total
  • Issues event: 3
  • Watch event: 7
  • Delete event: 1
  • Issue comment event: 1
  • Push event: 7
  • Pull request review comment event: 5
  • Pull request event: 9
  • Pull request review event: 10
  • Fork event: 9
  • Create event: 3
Last Year
  • Issues event: 3
  • Watch event: 7
  • Delete event: 1
  • Issue comment event: 1
  • Push event: 7
  • Pull request review comment event: 5
  • Pull request event: 9
  • Pull request review event: 10
  • Fork event: 9
  • Create event: 3

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 42
  • Total pull requests: 53
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 20 days
  • Total issue authors: 20
  • Total pull request authors: 16
  • Average comments per issue: 1.6
  • Average comments per pull request: 1.6
  • Merged pull requests: 45
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 3
  • Pull requests: 2
  • Average time to close issues: 6 days
  • Average time to close pull requests: N/A
  • Issue authors: 3
  • Pull request authors: 1
  • Average comments per issue: 0.33
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • dedece35 (8)
  • jhertout (7)
  • Pierre-CGI (5)
  • qonto-android-team (2)
  • jduigoudev (2)
  • gaelfoppolo (2)
  • jycr (2)
  • bsrsyl (1)
  • TulasiPerigisetti7 (1)
  • EduardoXav (1)
  • Jberque (1)
  • StanislasJC (1)
  • essess74 (1)
  • davidy4ng (1)
  • agigleux (1)
Pull Request Authors
  • dedece35 (18)
  • jhertout (11)
  • Jberque (4)
  • Hyralc (3)
  • zippy1978 (3)
  • gaelfoppolo (3)
  • jycr (2)
  • ExalTomiche (2)
  • jduigoudev (2)
  • oussamaLaribi (2)
  • obeone (2)
  • olegoaer (2)
  • vincent314 (2)
  • StanislasJC (1)
  • davidy4ng (1)
Top Labels
Issue Labels
android (19) ios (14) 🏆 challenge 🏆 (11) :rocket: enhancement (9) :syringe: bug (8) codenarc (4) :spiral_notepad: documentation (4) :building_construction: refactoring (4) :card_file_box: rule (4) :grey_question: question (2) :beginner: good first issue (2) deletion (2) dependencies (1) to publish (1)
Pull Request Labels
android (13) ios (13) :card_file_box: rule (12) 🏆 challenge 🏆 (10) :rocket: enhancement (8) :building_construction: refactoring (6) :spiral_notepad: documentation (3) :syringe: bug (3) :interrobang: help wanted (1)

Dependencies

.github/workflows/build.yml actions
  • actions/cache v1 composite
  • actions/checkout v2 composite
  • actions/setup-java v1 composite
  • gradle/gradle-build-action v2 composite
android-plugin/Dockerfile docker
  • registry.snapp.fr/snapp/ecocode/sonar-ecocode/feature-new-ui latest build
android-plugin/docker-compose.yml docker
  • sonarqube 8.6-community
codenarc-converter/CodeNarc/docker/Dockerfile docker
  • openjdk 8-jre-slim build
docker-compose.yml docker
  • postgres 12
  • sonarqube 9.3-community
android-plugin/pom.xml maven
  • org.sonarsource.java:sonar-java-plugin 6.14.0.25463 provided
  • org.sonarsource.sonarqube:sonar-plugin-api provided
  • com.fasterxml.staxmate:staxmate 2.3.1
  • com.fasterxml.woodstox:woodstox-core 5.2.1
  • com.github.spotbugs:spotbugs-annotations 4.5.3
  • com.google.code.gson:gson 2.6.2
  • com.google.guava:guava 26.0-jre
  • commons-io:commons-io 2.11.0
  • commons-lang:commons-lang 2.6
  • junit:junit 4.13.2
  • org.apache.ant:ant 1.10.11
  • org.assertj:assertj-core 3.21.0
  • org.codenarc:CodeNarc 2.2.3
  • org.gmetrics:GMetrics 1.1
  • org.jacoco:org.jacoco.core 0.8.6
  • org.slf4j:slf4j-api 1.6.2
  • org.sonarsource.analyzer-commons:sonar-analyzer-commons 1.13.0.662
  • org.sonarsource.analyzer-commons:sonar-xml-parsing 1.13.0.662
  • org.sonarsource.sonarqube:sonar-plugin-api-impl ${sonarqube.version}
  • org.sonarsource.sslr-squid-bridge:sslr-squid-bridge 2.6.1
  • ch.qos.logback:logback-classic 0.9.30 test
  • org.assertj:assertj-core 3.6.1 test
  • org.mockito:mockito-core 3.12.4 test
  • org.sonarsource.analyzer-commons:sonar-analyzer-test-commons 1.13.0.662 test
  • org.sonarsource.analyzer-commons:test-sonar-xml-parsing 1.13.0.662 test
  • org.sonarsource.java:java-checks-testkit 6.14.0.25463 test
  • org.sonarsource.sslr:sslr-testing-harness 1.21 test
  • xmlunit:xmlunit 1.6 test
codenarc-converter/CodeNarc/build.gradle maven
  • junit:junit 4.12 compileOnly
  • org.codehaus.groovy:groovy $groovyVersion implementation
  • org.codehaus.groovy:groovy-ant $groovyVersion implementation
  • org.codehaus.groovy:groovy-json $groovyVersion implementation
  • org.codehaus.groovy:groovy-templates $groovyVersion implementation
  • org.codehaus.groovy:groovy-xml $groovyVersion implementation
  • org.gmetrics:GMetrics 1.1 implementation
  • org.slf4j:slf4j-api $slf4jVersion implementation
  • com.github.stefanbirkner:system-rules 1.16.1 testImplementation
  • commons-cli:commons-cli 1.4 testImplementation
  • junit:junit 4.12 testImplementation
  • org.slf4j:slf4j-simple $slf4jVersion testImplementation
  • org.codehaus.groovy:groovy-macro $groovyVersion testRuntime
codenarc-converter/CodeNarc/integration-test/build.gradle maven
  • junit:junit 4.12 testImplementation
codenarc-converter/pom.xml maven
  • com.google.auto.value:auto-value 1.8.2 provided
  • com.google.auto.value:auto-value-annotations 1.8.2
  • com.google.guava:guava 31.0.1-jre
  • commons-io:commons-io 2.11.0
  • commons-lang:commons-lang 2.6
  • junit:junit 4.13.2
  • org.codenarc:CodeNarc 2.2.3
  • org.commonmark:commonmark 0.18.1
  • org.commonmark:commonmark-ext-gfm-tables 0.18.1
  • org.commonmark:commonmark-ext-yaml-front-matter 0.18.0
  • org.gmetrics:GMetrics 1.1
  • org.slf4j:slf4j-simple 1.7.33
  • org.sonarsource.sonarqube:sonar-plugin-api
  • com.googlecode.java-diff-utils:diffutils 1.3.0 test
pom.xml maven
  • org.sonarsource.sonarqube:sonar-plugin-api 8.7.1.42226 provided
  • junit:junit 4.12
  • org.assertj:assertj-core 3.17.2 test
  • org.junit.jupiter:junit-jupiter 5.7.0 test
  • org.junit.jupiter:junit-jupiter-migrationsupport 5.7.0 test
.github/workflows/tag_release.yml actions
  • 74th/workflow-permission-action 1.0.0 composite
  • actions/checkout v3 composite
  • actions/create-release v1 composite
  • actions/download-artifact v3 composite
  • actions/upload-artifact v3 composite
  • actions/upload-release-asset v1 composite
  • ffurrer2/extract-release-notes v1 composite
ios-plugin/Dockerfile docker
  • sonarqube 9.8-community build
ios-plugin/docker-compose.yml docker
  • postgres 12
ios-plugin/commons-ios/pom.xml maven
  • com.fasterxml.staxmate:staxmate 2.4.0
  • org.antlr:antlr4-runtime 4.10
  • org.json:json 20220320
ios-plugin/pom.xml maven
  • org.sonarsource.sonarqube:sonar-plugin-api provided
  • commons-io:commons-io 2.6
  • org.antlr:antlr4-runtime 4.10
  • org.sonarsource.analyzer-commons:sonar-analyzer-commons
  • org.sonarsource.analyzer-commons:sonar-xml-parsing ${sonar.analyzerCommons.version}
  • org.sonarsource.sonarqube:sonar-plugin-api-impl
  • junit:junit test
  • org.assertj:assertj-core test
  • org.mockito:mockito-core 4.4.0 test
  • org.sonarsource.sonarqube:sonar-testing-harness ${sonarqube.version} test
  • org.sonarsource.sslr:sslr-testing-harness 1.21 test
ios-plugin/sonar-ios-plugin/pom.xml maven
  • io.ecocode:ecocode-swift-lang ${project.version}
ios-plugin/swift-lang/pom.xml maven
  • io.ecocode:ecocode-commons-ios ${project.version}