All Projects → noties → Enhance

noties / Enhance

Licence: Apache-2.0 license
Add API information (since/deprecation) to Android source code as javadoc tags

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Enhance

pysourcenote
Python源码学习笔记
Stars: ✭ 45 (-43.04%)
Mutual labels:  source-code
TOSView
Draw the traces of OS(Linux, xv6, ...) kernel functions in a graph and link graph nodes to the source codes
Stars: ✭ 29 (-63.29%)
Mutual labels:  source-code
errata
Source code error pretty printing
Stars: ✭ 41 (-48.1%)
Mutual labels:  source-code
BP-Network
Multi-Classification on dataset of MNIST
Stars: ✭ 72 (-8.86%)
Mutual labels:  source-code
make ext4fs
termux make_ext4fs sefcontext_decompile img2simg simg2img
Stars: ✭ 29 (-63.29%)
Mutual labels:  android-tools
I-CTF-FWHIBBIT
Challenges source code
Stars: ✭ 41 (-48.1%)
Mutual labels:  source-code
Java-Interview-Programs
Core Java Projects with complete source code
Stars: ✭ 48 (-39.24%)
Mutual labels:  source-code
Tomcat7.0.67
学习tomcat(7.0.67)源码
Stars: ✭ 17 (-78.48%)
Mutual labels:  source-code
android-source-codes
⚙️ Code analysis of common Android projects and components.
Stars: ✭ 59 (-25.32%)
Mutual labels:  source-code
VarCLR
VarCLR: Variable Semantic Representation Pre-training via Contrastive Learning
Stars: ✭ 30 (-62.03%)
Mutual labels:  source-code
Potato
Read the fucking source code for the Android interview
Stars: ✭ 67 (-15.19%)
Mutual labels:  source-code
fnf-week-7-code
Friday Night Funkin' Week 7 HTML5 Code Rip
Stars: ✭ 29 (-63.29%)
Mutual labels:  source-code
phpBolt
Best php encoder - free | Encrypt php source code
Stars: ✭ 113 (+43.04%)
Mutual labels:  source-code
L4D2-Plugins
L4D2 Competitive enhancement, bug/glitch fixes, general purpose and freaky-fun plugins.
Stars: ✭ 64 (-18.99%)
Mutual labels:  source-code
tea-notes
Source code for Tea Notes app. Built with React Native. Search "Tea Notes" to download in app store.
Stars: ✭ 14 (-82.28%)
Mutual labels:  source-code
Spy-Quiz
Hacker Challenge 👾
Stars: ✭ 17 (-78.48%)
Mutual labels:  source-code
Repo
一个基于shell + gradle开发的效率工具,用来优化模块化/组件化分仓后带来的编译和调试痛点,提升开发效率
Stars: ✭ 28 (-64.56%)
Mutual labels:  android-tools
badlion-src
Source Code of the 2.0.0-v-beta Badlion Client (no BAC included)
Stars: ✭ 39 (-50.63%)
Mutual labels:  source-code
apollo
Advanced similarity and duplicate source code proof of concept for our research efforts.
Stars: ✭ 49 (-37.97%)
Mutual labels:  source-code
android-localization-helper
Make sure that you aren't missing string translations in any language, and keep your localized strings organized.
Stars: ✭ 43 (-45.57%)
Mutual labels:  android-tools

Enhance!

Command line utility to process Android source files distributed via SDK manager and add API version information as javadoc tags:

/**
 * Called by the system when the activity changes from fullscreen mode to multi-window mode and
 * visa-versa.
 *
 * @see android.R.attr#resizeableActivity
 * @param isInMultiWindowMode True if the activity is in multi-window mode.
 * @deprecated Use {@link #onMultiWindowModeChanged(boolean, Configuration)} instead.
 * @since 7.0 Nougat (24)
 * @deprecated 8.0 Oreo (26)
 */
@Deprecated
public void onMultiWindowModeChanged(boolean isInMultiWindowMode) {
    // Left deliberately empty. There should be no side effects if a direct
    // subclass of Activity does not call super.
}

Ironically allows to actually format processed code with AOSP code style specification (and as google-java-format is used - GOOGLE style is also supported).


Pick the jar file from the latest release.

There are few configuration options:

  • sdk: (required) Android SDK version (for example 25)
  • format: Allows to format processed Java source files. Available options are: aosp and google. Everything else (including empty argument) won't format processed code
  • sp: path to Android SDK
  • diff: just generate statistics info/diff for specified SDK version
usage: Enhance
 -diff                  Emit diff
 -format <arg>          Format sources. Accepts (aosp|google). Everything
                        else would keep original formatting
 -h,--help              Prints help
 -sdk <arg>             Specify which SDK version to process.
 -sp,--sdk-path <arg>   Path to Android SDK. If not specified
                        'ANDROID_HOME' system variable will be used

Please note that you Android SDK folder must already contain sources for specified sdk version.

So, usage would be like that:

# just add api information to source code, no formatting
java -jar enhance.jar -sdk 26

# also format with AOSP
java -jar enhance.jar -sdk 26 -format aosp

# or GOOGLE
java -jar enhance.jar -sdk 26 -format google

# or with custom SDK path
java -jar enhance.jar -sdk 26 -sp "/Users/not_me/android/sdk"

If you would like to restore unmodified copy of source code you can find it: {your-home-directory}/.enhance-backup/android-{sdk}

Thanks

Big kudos to the maintainers of amazing javaparser!

License

  Copyright 2018 Dimitry Ivanov ([email protected])

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].