Skip to content

Instantly share code, notes, and snippets.

🇯🇵
Vacationing

Nicola Corti cortinico

🇯🇵
Vacationing
Block or report user

Report or block cortinico

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@cortinico
cortinico / android-learning-material.md
Last active May 11, 2017
A short list of useful books/libraries/newsletters for every android developer (EN/IT)
View android-learning-material.md

Here I collect all the useful material related to Android world, probably useful for newbies and people that have never developed on Android.

Feel free to suggest any other source to add in this list :)

Nic :D - corti.nico@gmail.com

English

@cortinico
cortinico / README.md
Created Jun 6, 2017 — forked from lopspower/README.md
Publish AAR to jCenter and Maven Central
View README.md

Publish AAR to jCenter and Maven Central

Twitter

Now I'm going to list how to publish an Android libray to jCenter and then syncronize it with Maven Central:

  1. I use "Android Studio" and I have this simple android lib that I would like to be available on maven: CircularImageView

  2. In the library folder(module) I have the lib code abovementioned. And applying in the build.gradle of this folder apply plugin: 'com.android.library' I got as output an .aar in the build/outputs/aar/ directory of the module's directory

@cortinico
cortinico / PrintRule.kt
Created Nov 27, 2018
Just a stupid JUnit rule that prints before and after executing a statement
View PrintRule.kt
import org.junit.rules.TestRule
import org.junit.runner.Description
import org.junit.runners.model.Statement
class PrintRule(val label: String) : TestRule {
override fun apply(statement: Statement, description: Description): Statement {
return object : Statement() {
override fun evaluate() {
println("$label before statement")
try {
@cortinico
cortinico / default.generated.config
Created Jan 18, 2019
Jetifier default config file
View default.generated.config
# Copyright (C) 2018 The Android Open Source Project
#
# 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,
@cortinico
cortinico / Makefile
Last active Jan 28, 2019
Circle CI setup for builing and publishing LaTeX files
View Makefile
CC = xelatex
SRC_DIR = "."
OUT_DIR = "."
SRC = $(shell find $(SRC_DIR) -name '*.tex')
# Build All
build: $(SRC)
$(CC) -output-directory=$(OUT_DIR) $<
@cortinico
cortinico / sample-yelp-api-specs.json
Created Oct 21, 2019
Sample Swagger Spec for a Yelp API
View sample-yelp-api-specs.json
{
"definitions": {
"Category": {
"description": "A Category used to group businesses",
"properties": {
"id": {
"description": "Unique ID of the Category",
"format": "int64",
"type": "integer"
},
@cortinico
cortinico / build.gradle
Created Oct 30, 2019
swagger-gradle-codegen Gradle Configuration Block
View build.gradle
plugins {
id("com.yelp.codegen.plugin") version "<latest_version>"
}
generateSwagger {
platform = "kotlin"
packageName = "com.yelp.codegen.samples"
inputFile = file("./sample_specs.json")
outputDir = file("./src/main/java/")
}
@cortinico
cortinico / build.gradle
Created Oct 30, 2019
swagger-gradle-codegen Configuring generate swagger to depend on preBuild
View build.gradle
preBuild.dependsOn(tasks.getByName(“generateSwagger"))
@cortinico
cortinico / Category.kt
Created Oct 30, 2019
Generated Category classes from swagger-gradle-codegen
View Category.kt
/**
* A Category used to group businesses on Yelp
* @property id Unique ID of the Category
* @property name Name of this category
*/
data class Category(
@Json(name = "id") var id: Long? = null,
@Json(name = "name") var name: String? = null
)
@cortinico
cortinico / Business.kt
Created Oct 30, 2019
Generated Business class from swagger-gradle-codegen
View Business.kt
/**
* Represents a specific Business on Yelp
* @property category Optional category of the business
* @property id Unique ID of this Business
* @property name Name of this specific Business
* @property photoUrls Photo URls for this Business
* @property status Status of this Business on Yelp
*/
data class Business (
@Json(name = "id") var id: Long,
You can’t perform that action at this time.