com.sbellanger.kit.lint

A library contain custom lint rules

Лицензия

Лицензия

Группа

Группа

io.github.stephenbellanger.kit.lint
Идентификатор

Идентификатор

lint-kit
Последняя версия

Последняя версия

1.0
Дата

Дата

Тип

Тип

aar
Описание

Описание

com.sbellanger.kit.lint
A library contain custom lint rules
Ссылка на сайт

Ссылка на сайт

https://github.com/stephenbellanger/lint-kit
Система контроля версий

Система контроля версий

https://github.com/stephenbellanger/lint-kit

Скачать lint-kit

Имя Файла Размер
lint-kit-1.0.pom
Обзор

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/io.github.stephenbellanger.kit.lint/lint-kit/ -->
<dependency>
    <groupId>io.github.stephenbellanger.kit.lint</groupId>
    <artifactId>lint-kit</artifactId>
    <version>1.0</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/io.github.stephenbellanger.kit.lint/lint-kit/
implementation 'io.github.stephenbellanger.kit.lint:lint-kit:1.0'
// https://jarcasting.com/artifacts/io.github.stephenbellanger.kit.lint/lint-kit/
implementation ("io.github.stephenbellanger.kit.lint:lint-kit:1.0")
'io.github.stephenbellanger.kit.lint:lint-kit:aar:1.0'
<dependency org="io.github.stephenbellanger.kit.lint" name="lint-kit" rev="1.0">
  <artifact name="lint-kit" type="aar" />
</dependency>
@Grapes(
@Grab(group='io.github.stephenbellanger.kit.lint', module='lint-kit', version='1.0')
)
libraryDependencies += "io.github.stephenbellanger.kit.lint" % "lint-kit" % "1.0"
[io.github.stephenbellanger.kit.lint/lint-kit "1.0"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.jetbrains.kotlin : kotlin-stdlib jar 1.4.32

Модули Проекта

Данный проект не имеет модулей.

lint-kit

Rules

  • NotAuthorizedSbcNaming

How to integrate

Step 1. Add the maven central repository to your build file

Add it in your root build.gradle at the end of repositories:

allprojects {  
   repositories {  
      mavenCentral()  
   }  
}  

Step 2. Add the dependency

dependencies {  
    implementation 'io.github.stephenbellanger.kit.lint:lint-kit:1.0'  
}  

Lint configuration

android {  
    lintOptions {  
        checkReleaseBuilds false  
        // Or, if you prefer, you can continue to check for errors in release builds,  
        // but continue the build even when errors are found:  
        abortOnError false  
        htmlOutput file("${project.buildDir}/reports/lint/lint-report.html")  
        xmlOutput file("${project.buildDir}/reports/lint/lint-report.xml")  
  
        enable 'WrongThreadInterprocedural',  
                'UnusedIds',  
                'UnsupportedChromeOsHardware',  
                'UnpackedNativeCode',  
                'UnknownNullness',  
                'TypographyQuotes',  
                'SyntheticAccessor',  
                'StopShip',  
                'SelectableText',  
                'RequiredSize',  
                'Registered',  
                'PermissionImpliesUnsupportedChromeOsHardware',  
                'NoHardKeywords',  
                'NewerVersionAvailable',  
                'NegativeMargin',  
                'MissingRegistered',  
                'MinSdkTooLow',  
                'MangledCRLF',  
                'LogConditional',  
                'LambdaLast',  
                'KotlinPropertyAccess',  
                'IconExpectedSize',  
                'FieldGetter',  
                'EasterEgg',  
                'ConvertToWebp',  
                'BackButton',  
                'AppLinksAutoVerifyWarning',  
                'AppLinksAutoVerifyError',  
                'CanvasSize',  
                'IntentReset',  
                'InvalidNavigation',  
                'InvalidWakeLockTag',  
                'MissingDefaultResource',  
                'RequiresFeature',  
                'Slices',  
                'TranslucentOrientation',  
                'ValidActionsXml',  
                'Untranslatable',  
                'DeletedProvider',  
                'DeprecatedProvider',  
                'ProxyPassword',  
                'RiskyLibrary',  
                'ExpiredTargetSdkVersion',  
                'ExpiringTargetSdkVersion',  
                'OutdatedLibrary',  
                'SyntheticAccessor',  
                'Autofill',  
                'ConstantLocale',  
                'KotlinPropertyAccess',  
                'LambdaLast',  
                'NoHardKeywords',  
                'UnknownNullness'  
        disable 'TrustAllX509TrustManager',  
                'ObsoleteLintCustomCheck',  
                'SyntheticAccessor', // many use case in Kotlin  
                'Overdraw',  
                'MissingRegistered', // Lib are not part of sources sets for Lint  
                'PluralsCandidate', // Generation is done from POEditor, case to case exception is hard  
                'UnusedIds'  
        warningsAsErrors true  
        lintConfig file("${rootProject.projectDir}/config/lint/lint-config.xml")  
    }  
}  

Tutorial push maven repository

Maven configuration

Add maven-publish and signing plugins in build.gradle file :

plugins {  
  id 'maven-publish'  
  id 'signing'  
}

See in lint-kit module maven-push.gradle file and add this file in build.gradle file :

apply from: 'maven-push.gradle'

In maven-push.gradle :

afterEvaluate {  
	publishing {  
		publications {  
			release(MavenPublication) {  
				from components.release    
				groupId = GROUP 
                artifactId = ARTEFACT_ID  
                version = VERSION_CODE  
  
                pom {  
	                name = POM_NAME  
                    description = POM_DESCRIPTION  
                    url = POM_URL  
  
                    scm {  
	                    connection = POM_SCM_CONNECTION  
                        developerConnection = POM_SCM_DEV_CONNECTION  
                        url = POM_SCM_URL  
                    }  

					licenses {  
						license {  
							name = POM_LICENCE_NAME  
                            url = POM_LICENCE_URL  
                            distribution = POM_LICENCE_DIST  
                        }  
	                }  

					developers {  
						developer {  
							id = POM_DEVELOPER_ID  
                            name = POM_DEVELOPER_NAME  
                            email = POM_DEVELOPER_EMAIL  
                        }  
					 } 
				 }  
				 repositories {  
					 maven {  
						 credentials {  
							 username = getRepositoryUsername()
							 password = getRepositoryPassword()  
                        }  
                        url = version.endsWith('SNAPSHOT') ? getSnapshotRepositoryUrl() : getReleaseRepositoryUrl()  
                     }  
                 }
           } 
    }  
    signing {  
	    sign publishing.publications.release  
	}  
  
	task androidSourcesJar(type: Jar) {  
		classifier = 'sources'  
	    from android.sourceSets.main.java.sourceFiles  
    }  
  
	artifacts {  
		archives androidSourcesJar  
	}  
 }
}

All variables are in gradle.properties file.

VERSION_NAME=0.0.1  
VERSION_CODE=1.0  
GROUP=[com.example.library]
ARTEFACT_ID=[library-name]
POM_DESCRIPTION=[A great library]  
POM_URL=[https://github.com/user/library-name]
POM_SCM_URL=[https://github.com/user/library-name]  
POM_SCM_CONNECTION=[scm:git@github.user/library-name.git]  
POM_SCM_DEV_CONNECTION=[scm:git@github.user/library-name.git]
POM_LICENCE_NAME=The Apache Software License, Version 2.0  
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt  
POM_LICENCE_DIST=repo  
POM_DEVELOPER_ID=[github_username]  
POM_DEVELOPER_NAME=[Dupond developer]
POM_DEVELOPER_EMAIL=[duponddeveloper@gmail.com]  

# Sonatype nexus
NEXUS_USERNAME=[sonatype_username]  
NEXUS_PASSWORD=[sonatype_password]

# Signing with gpg
signing.keyId=[gpg_key_id] #Last 8 symbols of your gpg key
signing.password=[gpg_password]  
signing.secretKeyRingFile=[/Users/username/.gnupg/secring.gpg]

Documentations

Lint Rules

Maven deployment

GPG signing

Версии библиотеки

Версия
1.0