登录

去注册 忘记密码?

登录

注册

去登录

  • 扫码关注公众号
  • 发送“我爱安卓
  • 即可获取验证码

注册

解锁回答区域

  • 扫码关注公众号
  • 发送“我爱安卓

若你登陆,将永久解锁;
若未登录,仅本机解锁。

解锁回答区域

获取注册验证码

  • 扫码关注公众号
  • 发送“我爱安卓
  • 即可获取验证码

KotlinJunk,kotlin下的垃圾代码生成器

mikaelzero   2022-03-13 23:07   收藏

generate junk kotlin code in android

Usage

allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
    }
}


dependencies {
    classpath "com.didiglobal.booster:booster-gradle-plugin:$booster_version"
    classpath "com.github.mikaelzero:KotlinJunk:${version}"
}


apply plugin: 'com.didiglobal.booster'


//in gradle.properties
kotlinJunkCount = 10

Features

interface

public interface Qpkrqbwobqtirda {
    public val olfetgcyzyticvj: String

    public fun qwasqwehyixrcts(): Unit
}

enum

public enum class Xvyzisavepnmjhj {
    JKAMHQRCFMLVEDX,
    TASOFLCHZDLYQUU,
    OSYKOMAGGSXECRV,
}

object

public object Kryoje4

Activity

public class Elyjyi8Activity : Activity() {
    //fields
    //methods
}

Field

private val izakxzoogcjfhkg: Double = 0.5729293316023563
private val xwqmlwyizyhvwnt: Boolean = true
private val adbjemjeiqgxphb: Int = 671
private val wskgnuazbkkgvjt: String = "jcqcqaigylfpqai"

Method

public fun Int.jxoxphcdxnhttjt(): Int = if (this < 0) -this else this
public fun icsfahdgsemhlvv(a: Int, b: Int = 0): Unit {
    print("""a + b = ${a + b}""")
}
public fun izhrqvdskrfhjwn(): String = """chwhsnicfyjuved"""
public fun Int.pyfmptxwulfnyue(): Int = if (this < 0) -this else this

Drawable

<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="108dp" android:height="108dp" android:viewportWidth="108" android:viewportHeight="108">
    <path android:fillColor="#3DDC84" android:pathData="M0,0h108v108h-108z" />
    <path android:fillColor="#00000000" android:pathData="M9,0L9,108" android:strokeWidth="0.8" android:strokeColor="#33FFFFFF" />
    <path android:fillColor="#00000000" android:pathData="M39,0L39,09" android:strokeWidth="4" android:strokeColor="#924853" />
</vector>

Layout

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="center" android:gravity="center" android:orientation="vertical">

    <TextView android:id="@+id/textview_first" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="dldwmrivxrslrwl" />

    <Button android:id="@+id/button_first" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="fbxjfmolftemxyy" />
</LinearLayout>

String


<resources>
    <string name="kounk_akpbda0">eulfsjtkrythryy</string>
    <string name="kounk_rntuhb1">hiflhinowuwwcno</string>
    <string name="kounk_ccehhc2">zucgtoqvqxxcsaw</string>
</resources>

Thanks

https://github.com/didi/booster

https://github.com/qq549631030/AndroidJunkCode

项目地址:https://github.com/mikaelzero/KotlinJunk