Skip to content

Commit

Permalink
Change project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
nekocode committed Jun 28, 2018
1 parent 56ac374 commit 5f17f6c
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 78 deletions.
File renamed without changes.
10 changes: 10 additions & 0 deletions buildSrc/build.gradle
@@ -0,0 +1,10 @@
repositories {
google()
jcenter()
}

apply from: file('common.gradle')

allDependencies.each {
dependencies.add('implementation', it)
}
22 changes: 22 additions & 0 deletions buildSrc/buildSrc.gradle
@@ -0,0 +1,22 @@
apply from: file('common.gradle')

allDependencies.each {
dependencies.add('compileOnly', it)
}


apply plugin: 'com.github.dcendents.android-maven'

group='com.github.nekocode'
archivesBaseName='asm-systrace-plugin'
libsDirName='output'

// build a jar with source files
task sourcesJar(type: Jar) {
from sourceSets.main.java.srcDirs
classifier = 'sources'
}

artifacts {
archives sourcesJar
}
13 changes: 13 additions & 0 deletions buildSrc/common.gradle
@@ -0,0 +1,13 @@
apply plugin: 'groovy'

compileGroovy {
sourceCompatibility = "1.7"
targetCompatibility = "1.7"
options.encoding = "UTF-8"
}

ext.allDependencies = [
dependencies.gradleApi(),
dependencies.localGroovy(),
"com.android.tools.build:gradle:3.1.3"
]
11 changes: 0 additions & 11 deletions example/build.gradle
@@ -1,17 +1,6 @@
apply plugin: 'com.android.application'
apply plugin: 'asm-systrace'

buildscript {
repositories {
maven { url project(':gradle-plugin').file('.maven').toURI() }
google()
jcenter()
}
dependencies {
classpath 'com.github.nekocode:asm-systrace-plugin:local'
}
}

android {
compileSdkVersion 27
defaultConfig {
Expand Down
58 changes: 0 additions & 58 deletions gradle-plugin/build.gradle

This file was deleted.

11 changes: 2 additions & 9 deletions settings.gradle
@@ -1,10 +1,3 @@
include ':gradle-plugin'
include ':buildSrc', ':example'

if (new File('local').exists()) {
final File firstBuild = new File('first-build')
if (!firstBuild.exists()) {
include ':example'
} else {
firstBuild.delete()
}
}
project(':buildSrc').buildFileName = 'buildSrc.gradle'

0 comments on commit 5f17f6c

Please sign in to comment.