Skip to content

Commit

Permalink
Use artifact transforms - some hacky mess here unfortunately, very WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
LunNova committed Jan 9, 2020
1 parent bafbbfb commit 8daf682
Show file tree
Hide file tree
Showing 18 changed files with 440 additions and 238 deletions.
52 changes: 52 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# More details on how to configure the Travis build
# https://docs.travis-ci.com/user/customizing-the-build/

# Speed up build with travis caches
cache:
directories:
- $HOME/.gradle/caches/modules-2/
- $HOME/.gradle/wrapper/

# Remove often changing files to prevent cache re-upload on no changes in dependencies
before_cache:
# pom, xml and jar files are known not to change
# assume non-whitelisted extensions are changing
# (this will include .lock, .bin, .metadata and potential future additions to gradle's caches folder)
- find $HOME/.gradle/caches/modules-2 -type f -not \( -iname \*.pom -o -iname \*.jar -o -iname \*.xml \) -delete
# xml files which change
- find $HOME/.gradle/caches/modules-2 -name ivy.xml -delete
# remove left over empty directories
- find $HOME/.gradle/caches/modules-2 -type d -empty -delete

language: java

jdk:
- openjdk8
- openjdk11
- openjdk12 # TODO unsupported, remove soon?
- openjdk13

#Skipping install step to avoid having Travis run arbitrary './gradlew assemble' task
# https://docs.travis-ci.com/user/customizing-the-build/#Skipping-the-Installation-Step
install:
- true

#Don't build tags
branches:
only:
- master
except:
- /^v\d/

#Build and perform release (if needed)
script:
- ./gradlew build -s

deploy:
provider: script
script: ./gradlew ciPerformRelease
edge: true
cleanup: false
on:
jdk: openjdk12
branch: master
36 changes: 9 additions & 27 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ buildscript {
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies { classpath 'org.minimallycorrect.gradle:DefaultsPlugin:0.0.41' }
dependencies { classpath 'org.minimallycorrect.gradle:DefaultsPlugin:0.0.45' }
}
plugins {
id 'java'
Expand All @@ -13,52 +13,34 @@ plugins {
apply plugin: 'org.minimallycorrect.gradle.DefaultsPlugin'

group = 'org.minimallycorrect.mixin'
version = '1.0.1-SNAPSHOT'

minimallyCorrectDefaults {
description = "Applies Mixin-style monkey patches to .java source or compiled .class files"
labels = ["mixin", "java", "aspect-oriented-programming", "bytecode-manipulation"]
}()


/*
// Source compiler configuration
tasks.withType(JavaCompile) {
sourceCompatibility = 8
targetCompatibility = 8
options.with {
deprecation = true
encoding = 'UTF-8'
compilerArgs << "-Xlint:all" << "-Xlint:-path" << "-Xlint:-processing"
}
}
*/


allprojects {
tasks.withType(Test) {
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
}
}

configurations {
hidden
compile.extendsFrom hidden
all {
resolutionStrategy {
failOnVersionConflict()
configurations {
all {
resolutionStrategy {
failOnVersionConflict()

force('com.google.code.findbugs:jsr305:3.0.2')
force('com.google.code.findbugs:jsr305:3.0.2')

cacheChangingModulesFor 10, 'seconds'
cacheChangingModulesFor 10, 'seconds'
}
}
}
}

dependencies {
testImplementation "junit:junit:4.12"
implementation 'me.nallar.whocalled:WhoCalled:1.1'
api 'org.minimallycorrect.javatransformer:JavaTransformer:1.8.10'
api 'org.minimallycorrect.javatransformer:JavaTransformer:1.8.12'
}

def gradlePluginJar = tasks.getByPath(':gradle-plugin:jar')
Expand Down
8 changes: 5 additions & 3 deletions gradle-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ plugins {
id 'org.minimallycorrect.gradle.DefaultsPlugin'
}

minimallyCorrectDefaults {}()
minimallyCorrectDefaults {
shipkit = false
}()

dependencies {
compileOnly 'com.google.guava:guava:25.1-jre' // bundled with gradle
//compileOnly 'com.google.guava:guava:25.1-jre' // bundled with gradle
implementation rootProject
testImplementation('org.spockframework:spock-core:1.3-groovy-2.4') {
exclude module: 'groovy-all'
Expand All @@ -20,7 +22,7 @@ gradlePlugin {
plugins {
mixinGradlePlugin {
id = 'org.minimallycorrect.mixin.gradle-plugin'
implementationClass = 'org.minimallycorrect.MixinGradlePlugin'
implementationClass = 'org.minimallycorrect.mixinplugin.MixinGradlePlugin'
}
}
}

This file was deleted.

This file was deleted.

Loading

0 comments on commit 8daf682

Please sign in to comment.